diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:50 +0000 |
commit | def92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch) | |
tree | 2ef34b9ad8bb9a9220e05d60352558b15f513894 /testing/web-platform/tests/interfaces/sanitizer-api.idl | |
parent | Adding debian version 125.0.3-1. (diff) | |
download | firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/interfaces/sanitizer-api.idl')
-rw-r--r-- | testing/web-platform/tests/interfaces/sanitizer-api.idl | 61 |
1 files changed, 37 insertions, 24 deletions
diff --git a/testing/web-platform/tests/interfaces/sanitizer-api.idl b/testing/web-platform/tests/interfaces/sanitizer-api.idl index 117a55fdf7..599d8f82ea 100644 --- a/testing/web-platform/tests/interfaces/sanitizer-api.idl +++ b/testing/web-platform/tests/interfaces/sanitizer-api.idl @@ -3,36 +3,49 @@ // (https://github.com/w3c/webref) // Source: HTML Sanitizer API (https://wicg.github.io/sanitizer-api/) -[ - Exposed=(Window), - SecureContext -] interface Sanitizer { - constructor(optional SanitizerConfig config = {}); +partial interface Element { + [CEReactions] undefined setHTMLUnsafe__TO_BE_MERGED(DOMString html, optional SanitizerConfig config = {}); + [CEReactions] undefined setHTML(DOMString html, optional SanitizerConfig config = {}); +}; - DocumentFragment sanitize((Document or DocumentFragment) input); - Element? sanitizeFor(DOMString element, DOMString input); +partial interface ShadowRoot { + [CEReactions] undefined setHTMLUnsafe__TO_BE_MERGED(DOMString html, optional SanitizerConfig config = {}); + [CEReactions] undefined setHTML(DOMString html, optional SanitizerConfig config = {}); +}; - SanitizerConfig getConfiguration(); - static SanitizerConfig getDefaultConfiguration(); +partial interface Document { + static Document parseHTMLUnsafe__TO_BE_MERGED(DOMString html, optional SanitizerConfig config = {}); + static Document parseHTML(DOMString html, optional SanitizerConfig config = {}); }; -dictionary SetHTMLOptions { - Sanitizer sanitizer; +dictionary SanitizerElementNamespace { + required DOMString name; + DOMString? _namespace = "http://www.w3.org/1999/xhtml"; }; -[SecureContext] -partial interface Element { - undefined setHTML(DOMString input, optional SetHTMLOptions options = {}); + +// Used by "elements" +dictionary SanitizerElementNamespaceWithAttributes : SanitizerElementNamespace { + sequence<SanitizerAttribute> attributes; + sequence<SanitizerAttribute> removeAttributes; }; -dictionary SanitizerConfig { - sequence<DOMString> allowElements; - sequence<DOMString> blockElements; - sequence<DOMString> dropElements; - AttributeMatchList allowAttributes; - AttributeMatchList dropAttributes; - boolean allowCustomElements; - boolean allowUnknownMarkup; - boolean allowComments; +typedef (DOMString or SanitizerElementNamespace) SanitizerElement; +typedef (DOMString or SanitizerElementNamespaceWithAttributes) SanitizerElementWithAttributes; + +dictionary SanitizerAttributeNamespace { + required DOMString name; + DOMString? _namespace = null; }; +typedef (DOMString or SanitizerAttributeNamespace) SanitizerAttribute; + +dictionary SanitizerConfig { + sequence<SanitizerElementWithAttributes> elements; + sequence<SanitizerElement> removeElements; + sequence<SanitizerElement> replaceWithChildrenElements; -typedef record<DOMString, sequence<DOMString>> AttributeMatchList; + sequence<SanitizerAttribute> attributes; + sequence<SanitizerAttribute> removeAttributes; + + boolean comments; + boolean dataAttributes; +}; |