mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
feat: implement ShadowRoot::setHTMLUnsafe (#36240)
Implements #36166 --------- Signed-off-by: TG <ebiritg@gmail.com>
This commit is contained in:
parent
5cdb0865ba
commit
1a3f10bba4
11 changed files with 46 additions and 4940 deletions
|
@ -453,6 +453,15 @@ impl ShadowRootMethods<crate::DomTypeHolder> for ShadowRoot {
|
|||
self.slot_assignment_mode
|
||||
}
|
||||
|
||||
/// <https://html.spec.whatwg.org/multipage/#dom-shadowroot-sethtmlunsafe>
|
||||
fn SetHTMLUnsafe(&self, html: DOMString, can_gc: CanGc) {
|
||||
// Step 2. Unsafely set HTMl given this, this's shadow host, and complaintHTML
|
||||
let target = self.upcast::<Node>();
|
||||
let context_element = self.Host();
|
||||
|
||||
Node::unsafely_set_html(target, &context_element, html, can_gc);
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-shadowroot-onslotchange
|
||||
event_handler!(onslotchange, GetOnslotchange, SetOnslotchange);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue