summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/StyleSheetList.idl
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-03-08 11:22:18 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-08 11:50:36 +0100
commita9830d9a5597741520538819b7605a74cd0ea46f (patch)
treef85dfc55c4e5114ce72c9fbfa1eda5d8dba3a8ec /Userland/Libraries/LibWeb/CSS/StyleSheetList.idl
parent0d515dea5d318b56a39525129689e4c89e9f8bc6 (diff)
downloadserenity-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.idl5
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;
+};