mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:47:45 +00:00
LibWeb: Actually initialize ShadowRoot bindings
`mode` and `host` attributes were always undefined.
This commit is contained in:
parent
d4cb089acb
commit
34913c48d3
2 changed files with 8 additions and 0 deletions
|
@ -18,6 +18,13 @@ ShadowRoot::ShadowRoot(Document& document, Element& host)
|
|||
set_host(&host);
|
||||
}
|
||||
|
||||
JS::ThrowCompletionOr<void> ShadowRoot::initialize(JS::Realm& realm)
|
||||
{
|
||||
MUST_OR_THROW_OOM(Base::initialize(realm));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::ShadowRootPrototype>(realm, "ShadowRoot"));
|
||||
return {};
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#ref-for-get-the-parent%E2%91%A6
|
||||
EventTarget* ShadowRoot::get_parent(Event const& event)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue