mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:37:35 +00:00
LibWeb: Support CSSRule.type
We already had the CSSRule::Type enum, but the values were not aligned with the CSSOM spec. This patch takes care of that, and then exposes the type of a CSSRule to JavaScript via the "type" attribute.
This commit is contained in:
parent
a0ba49a50a
commit
f4f850aaf2
4 changed files with 19 additions and 13 deletions
|
@ -2,4 +2,16 @@ interface CSSRule {
|
|||
|
||||
attribute CSSOMString cssText;
|
||||
|
||||
readonly attribute unsigned short type;
|
||||
|
||||
const unsigned short STYLE_RULE = 1;
|
||||
const unsigned short CHARSET_RULE = 2;
|
||||
const unsigned short IMPORT_RULE = 3;
|
||||
const unsigned short MEDIA_RULE = 4;
|
||||
const unsigned short FONT_FACE_RULE = 5;
|
||||
const unsigned short PAGE_RULE = 6;
|
||||
const unsigned short MARGIN_RULE = 9;
|
||||
const unsigned short NAMESPACE_RULE = 10;
|
||||
const unsigned short SUPPORTS_RULE = 12;
|
||||
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue