mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
LibWeb: Spec-comment parse_a_stylesheet()
Also introduce a `location` parameter when parsing a CSSStyleSheet. This is not provided by anyone yet.
This commit is contained in:
parent
05bd0ca3ee
commit
87b125dcb9
4 changed files with 29 additions and 14 deletions
|
@ -12,9 +12,11 @@
|
|||
|
||||
namespace Web::CSS {
|
||||
|
||||
CSSStyleSheet::CSSStyleSheet(NonnullRefPtrVector<CSSRule> rules)
|
||||
CSSStyleSheet::CSSStyleSheet(NonnullRefPtrVector<CSSRule> rules, Optional<AK::URL> location)
|
||||
: m_rules(CSSRuleList::create(move(rules)))
|
||||
{
|
||||
if (location.has_value())
|
||||
set_location(location->to_string());
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/cssom/#dom-cssstylesheet-insertrule
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue