diff --git a/source b/source index 3ed0c5218ff..9131b8a85f2 100644 --- a/source +++ b/source @@ -3219,6 +3219,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
CharacterData
node and its
replace data algorithmHTMLString
ScriptURLString
TrustedHTML
TrustedScriptURL
Document
parseHTMLUnsafe(HTMLString html);
+ static Document
parseHTMLUnsafe((TrustedHTML
or DOMString) html);
// resource metadata management
[PutForwards=href, LegacyUnforgeable] readonly attribute Location? location;
@@ -33073,7 +33073,7 @@ interface HTMLIFrameElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute USVString src;
- [CEReactions] attribute HTMLString srcdoc;
+ [CEReactions] attribute (TrustedHTML
or DOMString) srcdoc;
[CEReactions] attribute DOMString name;
[SameObject, PutForwards=value] readonly attribute DOMTokenList sandbox;
[CEReactions] attribute DOMString allow;
@@ -33851,11 +33851,41 @@ interface HTMLIFrameElement : HTMLElement {
The IDL attributes src
, srcdoc
, name
, sandbox
, and allow
must reflect the respective content
- attributes of the same name.
allow
must
+ reflect the respective content attributes of the same name.
+
+ The srcdoc
getter steps are:
Let attribute be the result of running get an attribute by namespace and local
+ name given null, srcdoc
's local name, and this.
If attribute is null, then return the empty string.
Return attribute's value.
The srcdoc
setter steps
+ are:
Let compliantString to the result of invoking the Get Trusted Type compliant string algorithm with TrustedHTML
, this's relevant global
+ object, the given value, "HTMLIFrameElement srcdoc
", and "script
".
Set an attribute value given
+ this, srcdoc
's local name, and
+ compliantString.
The supported tokens for sandbox
's DOMTokenList
are the allowed
@@ -112393,19 +112423,19 @@ document.body.appendChild(frame)
partial interface Element { - [CEReactions] undefined setHTMLUnsafe(HTMLString html); + [CEReactions] undefined setHTMLUnsafe((
method steps are:TrustedHTML
or DOMString) html); DOMString getHTML(optional GetHTMLOptions options = {}); - [CEReactions] attribute [LegacyNullToEmptyString] HTMLString innerHTML; - [CEReactions] attribute [LegacyNullToEmptyString] HTMLString outerHTML; - [CEReactions] undefined insertAdjacentHTML(DOMString position, HTMLString string); + [CEReactions] attribute (TrustedHTML
or [LegacyNullToEmptyString] DOMString) innerHTML; + [CEReactions] attribute (TrustedHTML
or [LegacyNullToEmptyString] DOMString) outerHTML; + [CEReactions] undefined insertAdjacentHTML(DOMString position, (TrustedHTML
or DOMString) string); }; partial interface ShadowRoot { - [CEReactions] undefined setHTMLUnsafe(HTMLString html); + [CEReactions] undefined setHTMLUnsafe((TrustedHTML
or DOMString) html); DOMString getHTML(optional GetHTMLOptions options = {}); - [CEReactions] attribute [LegacyNullToEmptyString] HTMLString innerHTML; + [CEReactions] attribute (TrustedHTML
or [LegacyNullToEmptyString] DOMString) innerHTML; }; dictionary GetHTMLOptions { @@ -112456,7 +112486,7 @@ dictionary GetHTMLOptions { interface DOMParser { constructor(); - [NewObject]Document
parseFromString(HTMLString string, DOMParserSupportedType type); + [NewObject]Document
parseFromString((TrustedHTML
or DOMString) string, DOMParserSupportedType type); }; enum DOMParserSupportedType { @@ -112477,6 +112507,12 @@ enum DOMParserSupportedType { type)+
- +
Let compliantString to the result of invoking the Get Trusted Type compliant string algorithm with
TrustedHTML
, this's relevant global + object, string, "DOMParser parseFromString
", and "script
".Let document be a new
Document
, whose content type is type and DOMParserSupportedType {The document's encoding will be left as its default, of UTF-8. In particular, any XML declarations or -
+meta
elements found while parsing string will have no effect.meta
elements found while parsing compliantString will have no effect.- @@ -112502,7 +112538,7 @@ enum DOMParserSupportedType {
- + compliantString.
Parse HTML from a string given document and - string.
Since document does not have a DOMParserSupportedType {
- Create an XML parser parse, associated with document, and with XML scripting support disabled.
Parse string using parser.
+Parse compliantString using parser.
If the previous step resulted in an XML well-formedness or XML namespace well-formedness @@ -112613,17 +112649,33 @@ enum DOMParserSupportedType { are:
+
- +
Let compliantHTML be the result of invoking the Get Trusted Type compliant string algorithm with
TrustedHTML
, this's relevant global + object, html, "Element setHTMLUnsafe
", and "script
".Let target be this's template contents if this is a
template
element; otherwise this.- + compliantHTML.
Unsafely set HTML given target, this, and - html.
+ are: + +
ShadowRoot
'ssetHTMLUnsafe(html)
method steps - are to unsafely set HTML given this, this's shadow host, and html.+
- + +
Let compliantHTML be the result of invoking the Get Trusted Type compliant string algorithm with
TrustedHTML
, this's relevant global + object, html, "ShadowRoot setHTMLUnsafe
", and "script
".- +
Unsafely set HTML given this, this's shadow host, and compliantHTML.
To unsafely set HTML, given an
Element
orDocumentFragment
target, anElement
contextElement, and a string @@ -112649,6 +112701,12 @@ enum DOMParserSupportedType { data-x="dom-parseHTMLUnsafe">parseHTMLUnsafe(html) method steps are:+
@@ -112805,10 +112863,16 @@ enum DOMParserSupportedType { are:- +
Let compliantHTML to the result of invoking the Get Trusted Type compliant string algorithm with
TrustedHTML
, this's relevant global + object, html, "Document parseHTMLUnsafe
", and "script
".Let document be a new
Document
, whose content type is "DOMParserSupportedType { true.
- + compliantHTML.
Parse HTML from a string given document and - html.
Return document.
+
- +
Let compliantString be the result of invoking the Get Trusted Type compliant string algorithm with
TrustedHTML
, this's relevant global + object, the given value, "Element innerHTML
", and "script
".Let context be this.
- + steps with context and compliantString.
Let fragment be the result of invoking the fragment parsing algorithm - steps with context and the given value.
If context is a
template
element, then set context to @@ -112828,11 +112892,17 @@ enum DOMParserSupportedType { steps are:+
- +
Let compliantString be the result of invoking the Get Trusted Type compliant string algorithm with
TrustedHTML
, this's relevant global + object, the given value, "ShadowRoot innerHTML
", and "script
".Let context be this's host.
- + steps with context and compliantString.
Let fragment be the result of invoking the fragment parsing algorithm - steps with context and the given value.
- @@ -112886,6 +112956,12 @@ enum DOMParserSupportedType { are:
Replace all with fragment within this.
+
- +
Let compliantString be the result of invoking the Get Trusted Type compliant string algorithm with
TrustedHTML
, this's relevant global + object, the given value, "Element outerHTML
", and "script
".Let parent be this's parent.
If parent is null, return. There would be no way to obtain a @@ -112899,7 +112975,7 @@ enum DOMParserSupportedType { node document,
body
, and the HTML namespace.- + steps given parent and compliantString.
Let fragment be the result of invoking the fragment parsing algorithm - steps given parent and the given value.
- @@ -112954,6 +113030,12 @@ enum DOMParserSupportedType { string) method steps are:
Replace this with fragment within this's parent.
+
- +
Let compliantString be the result of invoking the Get Trusted Type compliant string algorithm with
TrustedHTML
, this's relevant global + object, string, "Element insertAdjacentHTML
", and "script
".Let context be null.
Use the first matching item from this list:
@@ -112997,7 +113079,7 @@ enum DOMParserSupportedType {Let fragment be the result of invoking the fragment parsing algorithm - steps with context and string.
+ steps with context and compliantString.- Use the first matching item from this list: @@ -113062,7 +113144,7 @@ enum DOMParserSupportedType { and attributes like
script
or event handler content attributes.partial interface Range { - [CEReactions, NewObject]
DocumentFragment
createContextualFragment(HTMLString string); + [CEReactions, NewObject]DocumentFragment
createContextualFragment((TrustedHTML
or DOMString) string); };@@ -113072,6 +113154,12 @@ enum DOMParserSupportedType { method steps are:+
- +
Let compliantString be the result of invoking the Get + Trusted Type compliant string algorithm with
TrustedHTML
, this's relevant global + object, string, and"Range + createContextualFragment"
.- @@ -113103,7 +113191,7 @@ enum DOMParserSupportedType {
Let node be this's start node.
- + algorithm steps with element and compliantString.
Let fragment node be the result of invoking the fragment parsing - algorithm steps with element and string.
For each script of fragment node's @@ -118180,7 +118268,7 @@ interface WorkerGlobalScope : EventTarget { readonly attribute WorkerGlobalScope self; readonly attribute WorkerLocation location; readonly attribute WorkerNavigator navigator; - undefined importScripts(ScriptURLString... urls); + undefined importScripts((
TrustedScriptURL
or USVString)... urls); attribute OnErrorEventHandler onerror; attribute EventHandler onlanguagechange; @@ -119035,7 +119123,7 @@ interface SharedWorkerGlobalScope : WorkerGlobalScope[Exposed=(Window,DedicatedWorker,SharedWorker)] interface Worker : EventTarget { - constructor(ScriptURLString scriptURL, optional WorkerOptions options = {}); + constructor((
TrustedScriptURL
or USVString) scriptURL, optional WorkerOptions options = {}); undefined terminate(); @@ -119133,11 +119221,17 @@ enum WorkerType { "classic", "module" }; steps:+
- +
Let compliantScriptURL be the result of invoking the Get Trusted Type compliant string algorithm with
TrustedScriptURL
, this's relevant global + object, scriptURL, "Worker constructor
", and "script
".Let outside settings be the current settings object.
Let worker URL be the result of encoding-parsing a URL given - scriptURL, relative to outside settings.
+ compliantScriptURL, relative to outside settings.Any same-origin URL (including
blob:
URLs) can be used.data:
@@ -119174,7 +119268,7 @@ enum WorkerType { "classic", "module" };[Exposed=Window] interface SharedWorker : EventTarget { - constructor(ScriptURLString scriptURL, optional (DOMString or WorkerOptions) options = {}); + constructor((
TrustedScriptURL
or USVString) scriptURL, optional (DOMString or WorkerOptions) options = {}); readonly attribute MessagePort port; }; @@ -119223,6 +119317,12 @@ interface SharedWorker : EventTarget { constructor is invoked:+
- +
Let compliantScriptURL be the result of invoking the Get Trusted Type compliant string algorithm with
TrustedScriptURL
, this's relevant global + object, scriptURL, "SharedWorker constructor
", and + "script
".If options is a
DOMString
, set options to a newWorkerOptions
dictionary whosename
member is set to the value of options and whose other members @@ -119232,7 +119332,7 @@ interface SharedWorker : EventTarget {Let urlRecord be the result of encoding-parsing a URL given - scriptURL, relative to outside settings.
+ compliantScriptURL, relative to outside settings.Any same-origin URL (including
blob:
URLs) can be used.data:
@@ -119416,8 +119516,26 @@ interface SharedWorker : EventTarget {The
+ method steps are: + +importScripts(...urls)
- method steps are to import scripts into worker global scope given this - and urls.+
- + +
Let urlStrings be « ».
- +
+ +For each url of urls:
+ ++
+- +
Append the result of invoking the Get Trusted Type compliant string algorithm with
TrustedScriptURL
, this's relevant + global object, url, "Worker importScripts
", and "script
" to urlStrings.- +
Import scripts into worker global scope given this and + urlStrings.
To import scripts into worker global scope, given a
WorkerGlobalScope
object worker global scope, a list of