From 8a2505fd5ddb03ebf00de01d16f76cd1ff2d6fcb Mon Sep 17 00:00:00 2001 From: Luke Warlow Date: Wed, 13 Mar 2024 17:26:00 +0000 Subject: [PATCH] Upstream IDL changes from Trusted Types Part of https://github.com/w3c/trusted-types/issues/476 --- source | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/source b/source index 09230c2df53..05745920a28 100644 --- a/source +++ b/source @@ -4576,6 +4576,18 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • lock requests
  • + +
    Trusted Types
    + +
    +

    This specification uses the following features defined in Trusted Types: + TRUSTED-TYPES

    + + +

    @@ -10626,7 +10638,7 @@ typedef (HTMLScriptElement or SVGScriptElement) LegacyOverrideBuiltIns] partial interface Document { - static Document parseHTMLUnsafe(DOMString html); + static Document parseHTMLUnsafe(HTMLString html); // resource metadata management [PutForwards=href, LegacyUnforgeable] readonly attribute Location? location; @@ -10655,8 +10667,8 @@ partial interface Document { [CEReactions] Document open(optional DOMString unused1, optional DOMString unused2); // both arguments are ignored WindowProxy? open(USVString url, DOMString name, DOMString features); [CEReactions] undefined close(); - [CEReactions] undefined write(DOMString... text); - [CEReactions] undefined writeln(DOMString... text); + [CEReactions] undefined write(HTMLString... text); + [CEReactions] undefined writeln(HTMLString... text); // user interaction readonly attribute WindowProxy? defaultView; @@ -33014,7 +33026,7 @@ interface HTMLIFrameElement : HTMLElement { [HTMLConstructor] constructor(); [CEReactions] attribute USVString src; - [CEReactions] attribute DOMString srcdoc; + [CEReactions] attribute HTMLString srcdoc; [CEReactions] attribute DOMString name; [SameObject, PutForwards=value] readonly attribute DOMTokenList sandbox; [CEReactions] attribute DOMString allow; @@ -112188,7 +112200,7 @@ document.body.appendChild(frame) interface DOMParser { constructor(); - [NewObject] Document parseFromString(DOMString string, DOMParserSupportedType type); + [NewObject] Document parseFromString(HTMLString string, DOMParserSupportedType type); }; enum DOMParserSupportedType { @@ -112339,11 +112351,11 @@ enum DOMParserSupportedType { and attributes like script or event handler content attributes.

    partial interface Element {
    -  [CEReactions] undefined setHTMLUnsafe(DOMString html);
    +  [CEReactions] undefined setHTMLUnsafe(HTMLString html);
     };
     
     partial interface ShadowRoot {
    -  [CEReactions] undefined setHTMLUnsafe(DOMString html);
    +  [CEReactions] undefined setHTMLUnsafe(HTMLString html);
     };
    @@ -117467,7 +117479,7 @@ interface WorkerGlobalScope : EventTarget { readonly attribute WorkerGlobalScope self; readonly attribute WorkerLocation location; readonly attribute WorkerNavigator navigator; - undefined importScripts(USVString... urls); + undefined importScripts(ScriptURLString... urls); attribute OnErrorEventHandler onerror; attribute EventHandler onlanguagechange; @@ -118322,7 +118334,7 @@ interface SharedWorkerGlobalScope : WorkerGlobalScope
    [Exposed=(Window,DedicatedWorker,SharedWorker)]
     interface Worker : EventTarget {
    -  constructor(USVString scriptURL, optional WorkerOptions options = {});
    +  constructor(ScriptURLString scriptURL, optional WorkerOptions options = {});
     
       undefined terminate();
     
    @@ -118461,7 +118473,7 @@ enum WorkerType { "classic", "module" };
     
       
    [Exposed=Window]
     interface SharedWorker : EventTarget {
    -  constructor(USVString scriptURL, optional (DOMString or WorkerOptions) options = {});
    +  constructor(ScriptURLString scriptURL, optional (DOMString or WorkerOptions) options = {});
     
       readonly attribute MessagePort port;
     };
    @@ -142286,6 +142298,9 @@ INSERT INTERFACES HERE
        
    [TOUCH]
    Touch Events, D. Schepers, S. Moon, M. Brubeck, A. Barstow, R. Byers. W3C.
    +
    [TRUSTED-TYPES]
    +
    Trusted Types, K. Kotowicz, M. West. W3C.
    +
    [TZDATABASE]
    (Non-normative) Time Zone Database. IANA.