mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:07:44 +00:00
LibWeb: Allow to set a root mode value when constructing a ShadowRoot
This commit is contained in:
parent
01e2cc5330
commit
9ed4fe7049
3 changed files with 4 additions and 3 deletions
|
@ -12,8 +12,9 @@
|
|||
|
||||
namespace Web::DOM {
|
||||
|
||||
ShadowRoot::ShadowRoot(Document& document, Element& host)
|
||||
ShadowRoot::ShadowRoot(Document& document, Element& host, Bindings::ShadowRootMode mode)
|
||||
: DocumentFragment(document)
|
||||
, m_mode(mode)
|
||||
{
|
||||
set_host(&host);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ public:
|
|||
WebIDL::ExceptionOr<void> set_inner_html(DeprecatedString const&);
|
||||
|
||||
private:
|
||||
ShadowRoot(Document&, Element&);
|
||||
ShadowRoot(Document&, Element& host, Bindings::ShadowRootMode);
|
||||
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
|
||||
|
||||
// ^Node
|
||||
|
|
|
@ -382,7 +382,7 @@ void HTMLInputElement::create_shadow_tree_if_needed()
|
|||
break;
|
||||
}
|
||||
|
||||
auto shadow_root = heap().allocate<DOM::ShadowRoot>(realm(), document(), *this).release_allocated_value_but_fixme_should_propagate_errors();
|
||||
auto shadow_root = heap().allocate<DOM::ShadowRoot>(realm(), document(), *this, Bindings::ShadowRootMode::Closed).release_allocated_value_but_fixme_should_propagate_errors();
|
||||
auto initial_value = m_value;
|
||||
if (initial_value.is_null())
|
||||
initial_value = DeprecatedString::empty();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue