RESOLVED FIXED 137619
Nested template contents are not cloned by document.importNode
https://bugs.webkit.org/show_bug.cgi?id=137619
Summary Nested template contents are not cloned by document.importNode
Jake
Reported 2014-10-10 11:49:19 PDT
Given a nested template… <template id="select"> <fieldset> <legend>{{name}}</legend> <select> <option>pick something!</option> <template id="option"> <option value="{{value}}">{{text}}</option> </template> </select> </fieldset> </template> I can’t access the .content after the nested template has been duplicated with document.importNode. http://jsfiddle.net/jakecigar/sxe7dzc4/3/ PS It works in Chrome and firefox.
Attachments
Fixes the bug by sharing code with cloneNode (45.44 KB, patch)
2014-12-15 21:39 PST, Ryosuke Niwa
no flags
Fixes the bug by sharing code with cloneNode 2 (45.44 KB, patch)
2014-12-15 21:41 PST, Ryosuke Niwa
no flags
Jake
Comment 1 2014-10-15 15:16:26 PDT
Any ideas? Workarounds? Commiseration?
Alexey Proskuryakov
Comment 2 2014-10-16 00:17:09 PDT
See also: bug 137755.
Ryosuke Niwa
Comment 3 2014-12-14 00:00:29 PST
*** Bug 137755 has been marked as a duplicate of this bug. ***
Ryosuke Niwa
Comment 4 2014-12-15 21:39:58 PST
Created attachment 243346 [details] Fixes the bug by sharing code with cloneNode
Ryosuke Niwa
Comment 5 2014-12-15 21:41:17 PST
Created attachment 243347 [details] Fixes the bug by sharing code with cloneNode 2
Andreas Kling
Comment 6 2014-12-16 09:24:26 PST
Comment on attachment 243347 [details] Fixes the bug by sharing code with cloneNode 2 r=me
WebKit Commit Bot
Comment 7 2014-12-16 11:08:14 PST
Comment on attachment 243347 [details] Fixes the bug by sharing code with cloneNode 2 Clearing flags on attachment: 243347 Committed r177372: <http://trac.webkit.org/changeset/177372>
WebKit Commit Bot
Comment 8 2014-12-16 11:08:21 PST
All reviewed patches have been landed. Closing bug.
Jake
Comment 9 2014-12-17 10:24:09 PST
Thanks so much for the fix! It works nicely in my real page. Will this be in the next Safari for OS X and IOS?
Ryosuke Niwa
Comment 10 2014-12-18 22:35:07 PST
(In reply to comment #9) > Thanks so much for the fix! It works nicely in my real page. > > Will this be in the next Safari for OS X and IOS? Apple does not comment on future product plans.
Note You need to log in before you can comment on or make changes to this bug.