mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
script: Implement Element::GetHTML
and ShadowRoot::GetHTML
(#36106)
* Serialize html fragments without going through html5ever Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Implement ShadowRoot::GetHtml / Element::GetHtml Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Propagate CanGc annotations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
1c9f486f88
commit
19d5f5f06f
12 changed files with 286 additions and 15941 deletions
|
@ -120,14 +120,20 @@ partial interface Element {
|
|||
readonly attribute long clientHeight;
|
||||
};
|
||||
|
||||
// https://w3c.github.io/DOM-Parsing/#extensions-to-the-element-interface
|
||||
// https://html.spec.whatwg.org/multipage/#dom-parsing-and-serialization
|
||||
partial interface Element {
|
||||
[CEReactions] undefined setHTMLUnsafe(DOMString html);
|
||||
DOMString getHTML(optional GetHTMLOptions options = {});
|
||||
|
||||
[CEReactions, Throws] attribute [LegacyNullToEmptyString] DOMString innerHTML;
|
||||
[CEReactions, Throws] attribute [LegacyNullToEmptyString] DOMString outerHTML;
|
||||
};
|
||||
|
||||
dictionary GetHTMLOptions {
|
||||
boolean serializableShadowRoots = false;
|
||||
sequence<ShadowRoot> shadowRoots = [];
|
||||
};
|
||||
|
||||
// https://fullscreen.spec.whatwg.org/#api
|
||||
partial interface Element {
|
||||
Promise<undefined> requestFullscreen();
|
||||
|
|
|
@ -26,7 +26,7 @@ ShadowRoot includes DocumentOrShadowRoot;
|
|||
// https://html.spec.whatwg.org/multipage/#dom-parsing-and-serialization
|
||||
partial interface ShadowRoot {
|
||||
// [CEReactions] undefined setHTMLUnsafe((TrustedHTML or DOMString) html);
|
||||
// DOMString getHTML(optional GetHTMLOptions options = {});
|
||||
DOMString getHTML(optional GetHTMLOptions options = {});
|
||||
|
||||
// [CEReactions] attribute (TrustedHTML or [LegacyNullToEmptyString] DOMString) innerHTML;
|
||||
[CEReactions] attribute [LegacyNullToEmptyString] DOMString innerHTML;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue