@@ -1377,6 +1377,7 @@ where
1377
1377
self . insert_element ( Push , ns ! ( html) , name, vec ! [ ] )
1378
1378
}
1379
1379
1380
+ // https://html.spec.whatwg.org/multipage/parsing.html#insert-an-element-at-the-adjusted-insertion-location
1380
1381
fn insert_foreign_element (
1381
1382
& self ,
1382
1383
tag : Tag ,
@@ -1397,6 +1398,8 @@ where
1397
1398
}
1398
1399
//§ END
1399
1400
1401
+ // https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inhead
1402
+ // A start tag whose tag name is "template"
1400
1403
fn should_attach_declarative_shadow ( & self , tag : & Tag ) -> bool {
1401
1404
let adjusted_insertion_location = self . appropriate_place_for_insertion ( None ) ;
1402
1405
@@ -1411,7 +1414,7 @@ where
1411
1414
// template start tag's shadowrootmode is not in the none state
1412
1415
let is_shadow_root_mode = tag. attrs . iter ( ) . any ( |attr| {
1413
1416
attr. name . local == local_name ! ( "shadowrootmode" )
1414
- && ( attr. value . to_string ( ) == * "open" || attr. value . to_string ( ) == * "close " )
1417
+ && ( attr. value . to_string ( ) == * "open" || attr. value . to_string ( ) == * "closed " )
1415
1418
} ) ;
1416
1419
1417
1420
// Check if intended_parent's document allows declarative shadow roots
@@ -1435,6 +1438,8 @@ where
1435
1438
is_shadow_root_mode && allow_declarative_shadow_roots && adjusted_current_node_not_topmost
1436
1439
}
1437
1440
1441
+ // https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inhead
1442
+ // A start tag whose tag name is "template"
1438
1443
fn attach_declarative_shadow (
1439
1444
& self ,
1440
1445
tag : & Tag ,
0 commit comments