mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Implement trusted HTML sinks for Element (#36941)
Also implements a conversion for `TrustedHTMLOrNullIsEmptyString` to `TrustedHTMLOrString` to avoid introducing a separate `get_trusted_script_compliant_string` for the new type. Part of #36258 Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
This commit is contained in:
parent
a0dd2c1beb
commit
d780fb7695
27 changed files with 118 additions and 212 deletions
|
@ -82,7 +82,7 @@ interface Element : Node {
|
|||
[Throws]
|
||||
undefined insertAdjacentText(DOMString where_, DOMString data);
|
||||
[CEReactions, Throws]
|
||||
undefined insertAdjacentHTML(DOMString position, DOMString html);
|
||||
undefined insertAdjacentHTML(DOMString position, (TrustedHTML or DOMString) string);
|
||||
|
||||
[Throws, Pref="dom_shadowdom_enabled"] ShadowRoot attachShadow(ShadowRootInit init);
|
||||
readonly attribute ShadowRoot? shadowRoot;
|
||||
|
@ -122,11 +122,11 @@ partial interface Element {
|
|||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-parsing-and-serialization
|
||||
partial interface Element {
|
||||
[CEReactions] undefined setHTMLUnsafe(DOMString html);
|
||||
[CEReactions, Throws] undefined setHTMLUnsafe((TrustedHTML or DOMString) html);
|
||||
DOMString getHTML(optional GetHTMLOptions options = {});
|
||||
|
||||
[CEReactions, Throws] attribute [LegacyNullToEmptyString] DOMString innerHTML;
|
||||
[CEReactions, Throws] attribute [LegacyNullToEmptyString] DOMString outerHTML;
|
||||
[CEReactions, Throws] attribute (TrustedHTML or [LegacyNullToEmptyString] DOMString) innerHTML;
|
||||
[CEReactions, Throws] attribute (TrustedHTML or [LegacyNullToEmptyString] DOMString) outerHTML;
|
||||
};
|
||||
|
||||
dictionary GetHTMLOptions {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue