diff options
author | Andreas Kling <kling@serenityos.org> | 2021-03-08 11:22:18 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-08 11:50:36 +0100 |
commit | a9830d9a5597741520538819b7605a74cd0ea46f (patch) | |
tree | f85dfc55c4e5114ce72c9fbfa1eda5d8dba3a8ec /Userland/Libraries/LibWeb/CSS/StyleSheetList.idl | |
parent | 0d515dea5d318b56a39525129689e4c89e9f8bc6 (diff) | |
download | serenity-a9830d9a5597741520538819b7605a74cd0ea46f.zip |
LibWeb: Start exposing CSS style sheets to JavaScript :^)
This patch adds bindings for the following objects:
- StyleSheet
- StyleSheetList
- CSSStyleSheet
You can get to a document's style sheets via Document.styleSheets
and iterate through them using StyleSheetList's item() and length().
That's it in terms of functionality at this point, but still neat. :^)
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/StyleSheetList.idl')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/StyleSheetList.idl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/StyleSheetList.idl b/Userland/Libraries/LibWeb/CSS/StyleSheetList.idl new file mode 100644 index 0000000000..27460affa4 --- /dev/null +++ b/Userland/Libraries/LibWeb/CSS/StyleSheetList.idl @@ -0,0 +1,5 @@ +interface StyleSheetList { + // FIXME: item() should be a WebIDL "getter" + CSSStyleSheet? item(unsigned long index); + readonly attribute unsigned long length; +}; |