aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_bindings/webidls
diff options
context:
space:
mode:
Diffstat (limited to 'components/script_bindings/webidls')
-rw-r--r--components/script_bindings/webidls/Document.webidl14
-rw-r--r--components/script_bindings/webidls/HTMLScriptElement.webidl8
-rw-r--r--components/script_bindings/webidls/Worker.webidl2
-rw-r--r--components/script_bindings/webidls/WorkerGlobalScope.webidl2
4 files changed, 20 insertions, 6 deletions
diff --git a/components/script_bindings/webidls/Document.webidl b/components/script_bindings/webidls/Document.webidl
index 6131dbd15c7..737e74d3bf2 100644
--- a/components/script_bindings/webidls/Document.webidl
+++ b/components/script_bindings/webidls/Document.webidl
@@ -129,9 +129,9 @@ partial /*sealed*/ interface Document {
[CEReactions, Throws]
undefined close();
[CEReactions, Throws]
- undefined write(DOMString... text);
+ undefined write((TrustedHTML or DOMString)... text);
[CEReactions, Throws]
- undefined writeln(DOMString... text);
+ undefined writeln((TrustedHTML or DOMString)... text);
// user interaction
readonly attribute Window?/*Proxy?*/ defaultView;
@@ -204,6 +204,16 @@ partial interface Document {
Document includes DocumentOrShadowRoot;
+// https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface
+partial interface Document {
+ // CaretPosition? caretPositionFromPoint(double x, double y, optional CaretPositionFromPointOptions options = {});
+ readonly attribute Element? scrollingElement;
+};
+
+// dictionary CaretPositionFromPointOptions {
+// sequence<ShadowRoot> shadowRoots = [];
+// };
+
// https://w3c.github.io/selection-api/#dom-document
partial interface Document {
Selection? getSelection();
diff --git a/components/script_bindings/webidls/HTMLScriptElement.webidl b/components/script_bindings/webidls/HTMLScriptElement.webidl
index 6f02bb3cf47..2c7b398b7e3 100644
--- a/components/script_bindings/webidls/HTMLScriptElement.webidl
+++ b/components/script_bindings/webidls/HTMLScriptElement.webidl
@@ -21,8 +21,12 @@ interface HTMLScriptElement : HTMLElement {
attribute boolean defer;
[CEReactions]
attribute DOMString? crossOrigin;
- [CEReactions, Pure]
- attribute DOMString text;
+ [CEReactions, SetterThrows]
+ attribute (TrustedScript or DOMString) innerText;
+ [CEReactions, Pure, SetterThrows]
+ attribute (TrustedScript or DOMString) text;
+ [CEReactions, SetterThrows]
+ attribute (TrustedScript or DOMString)? textContent;
[CEReactions]
attribute DOMString integrity;
[CEReactions]
diff --git a/components/script_bindings/webidls/Worker.webidl b/components/script_bindings/webidls/Worker.webidl
index ef535126606..5faa7a5ea3e 100644
--- a/components/script_bindings/webidls/Worker.webidl
+++ b/components/script_bindings/webidls/Worker.webidl
@@ -11,7 +11,7 @@ interface mixin AbstractWorker {
// https://html.spec.whatwg.org/multipage/#worker
[Exposed=(Window,Worker)]
interface Worker : EventTarget {
- [Throws] constructor(USVString scriptURL, optional WorkerOptions options = {});
+ [Throws] constructor((TrustedScriptURL or USVString) scriptURL, optional WorkerOptions options = {});
undefined terminate();
[Throws] undefined postMessage(any message, sequence<object> transfer);
diff --git a/components/script_bindings/webidls/WorkerGlobalScope.webidl b/components/script_bindings/webidls/WorkerGlobalScope.webidl
index 05301fb28e6..db02773392d 100644
--- a/components/script_bindings/webidls/WorkerGlobalScope.webidl
+++ b/components/script_bindings/webidls/WorkerGlobalScope.webidl
@@ -19,6 +19,6 @@ interface WorkerGlobalScope : GlobalScope {
[Exposed=Worker]
partial interface WorkerGlobalScope { // not obsolete
[Throws]
- undefined importScripts(DOMString... urls);
+ undefined importScripts((TrustedScriptURL or USVString)... urls);
readonly attribute WorkerNavigator navigator;
};