aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webidls
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/webidls')
-rw-r--r--components/script/dom/webidls/Document.webidl5
-rw-r--r--components/script/dom/webidls/StyleSheet.webidl17
-rw-r--r--components/script/dom/webidls/StyleSheetList.webidl11
3 files changed, 33 insertions, 0 deletions
diff --git a/components/script/dom/webidls/Document.webidl b/components/script/dom/webidls/Document.webidl
index 6c1814fa43b..845037e430c 100644
--- a/components/script/dom/webidls/Document.webidl
+++ b/components/script/dom/webidls/Document.webidl
@@ -185,3 +185,8 @@ partial interface Document {
partial interface Document {
Element? elementFromPoint(double x, double y);
};
+
+// https://drafts.csswg.org/cssom/#extensions-to-the-document-interface
+partial interface Document {
+ [SameObject] readonly attribute StyleSheetList styleSheets;
+};
diff --git a/components/script/dom/webidls/StyleSheet.webidl b/components/script/dom/webidls/StyleSheet.webidl
new file mode 100644
index 00000000000..fdb4e875ce2
--- /dev/null
+++ b/components/script/dom/webidls/StyleSheet.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+// https://drafts.csswg.org/cssom/#the-stylesheet-interface
+interface StyleSheet {
+ readonly attribute DOMString type_;
+ readonly attribute DOMString? href;
+
+ // readonly attribute (Element or ProcessingInstruction)? ownerNode;
+ // readonly attribute StyleSheet? parentStyleSheet;
+ readonly attribute DOMString? title;
+
+ // [SameObject, PutForwards=mediaText] readonly attribute MediaList media;
+ // attribute boolean disabled;
+};
diff --git a/components/script/dom/webidls/StyleSheetList.webidl b/components/script/dom/webidls/StyleSheetList.webidl
new file mode 100644
index 00000000000..e743653fde3
--- /dev/null
+++ b/components/script/dom/webidls/StyleSheetList.webidl
@@ -0,0 +1,11 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+// https://drafts.csswg.org/cssom/#the-stylesheetlist-interface
+// [ArrayClass]
+interface StyleSheetList {
+ getter StyleSheet? item(unsigned long index);
+ readonly attribute unsigned long length;
+};