summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/interfaces/sanitizer-api.idl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
commitd8bbc7858622b6d9c278469aab701ca0b609cddf (patch)
treeeff41dc61d9f714852212739e6b3738b82a2af87 /testing/web-platform/tests/interfaces/sanitizer-api.idl
parentReleasing progress-linux version 125.0.3-1~progress7.99u1. (diff)
downloadfirefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz
firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.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.idl61
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;
+};