Fix the way the IS_CONNECTED flag is set

This commit is contained in:
Fernando Jiménez Moreno 2019-02-19 18:19:36 +01:00
parent 0d2f65baea
commit e66438de48
3 changed files with 13 additions and 16 deletions

View file

@ -46,6 +46,10 @@ impl ShadowRoot {
document_fragment
.upcast::<Node>()
.set_flag(NodeFlags::IS_IN_SHADOW_TREE, true);
document_fragment.upcast::<Node>().set_flag(
NodeFlags::IS_CONNECTED,
host.upcast::<Node>().is_connected(),
);
ShadowRoot {
document_fragment,
document_or_shadow_root: DocumentOrShadowRoot::new(document.window()),