Bug 197726

Summary: attachShadow should support attaching a shadow root to a main element
Product: WebKit Reporter: Steven <steven>
Component: DOMAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, cmarcelo, dbates, esprehn+autocc, ews-watchlist, kangil.han, koivisto, rniwa, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari 12   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 148695    
Attachments:
Description Flags
Fixes the bug none

Steven
Reported 2019-05-08 16:32:35 PDT
When trying to call `attachShadow` on a `<main>` element, Safari v12.1 and Safari Technology Preview throw an error: `NotSupportedError: The operation is not supported` even though `<main>` is a valid `attachShadow` target (https://dom.spec.whatwg.org/#dom-element-attachshadow). Test case: https://codepen.io/straker/pen/eapxaw
Attachments
Fixes the bug (40.54 KB, patch)
2019-10-04 20:41 PDT, Ryosuke Niwa
no flags
Radar WebKit Bug Importer
Comment 1 2019-05-10 18:33:04 PDT
Ryosuke Niwa
Comment 2 2019-10-04 20:41:43 PDT
Created attachment 380275 [details] Fixes the bug
Ryosuke Niwa
Comment 3 2019-10-04 20:51:21 PDT
It's weird that this test never existed. I swear I wrote one and contributed to WPT but I don't see it anymore...
Ryosuke Niwa
Comment 4 2019-10-04 20:53:17 PDT
Hm... it looks like I either failed to merge it into WPT or someone else had "refactored" the tests and got rid of my test cases :(
Ryosuke Niwa
Comment 5 2019-10-06 19:30:42 PDT
Comment on attachment 380275 [details] Fixes the bug Clearing flags on attachment: 380275 Committed r250770: <https://trac.webkit.org/changeset/250770>
Ryosuke Niwa
Comment 6 2019-10-06 19:30:44 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.