Javascript in "template" element ( using document.createElement( 'template' ))
Reported by
thabet...@gmail.com,
Apr 22 2018
|
|||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36
Steps to reproduce the problem:
var template = document.createElement( 'template' )
template.innerHTML = '<script>console.log("Hello World")</scr'+'ipt>'
shadowRoot.appendChild( document.importNode( template.content, true ) )
What is the expected behavior?
It should log "Hello World" in the console
What went wrong?
It's not working anymore.
Did this work before? Yes 65
Chrome version: 66.0.3359.117 Channel: stable
OS Version: OS X 10.12.0
Flash Version:
,
Apr 23 2018
Thanks for for filing the issue! @Reporter: Could you please share a sample test file with the above mentioned test case along with the steps to be performed, in order to reproduce the issue from our end. Any further inputs from your end may be helpful.
,
Apr 23 2018
Well the issue only happens when creating the Template through javascript. It works fine when rendering it inside HTML directly. I have attached an HTML file with an example about the issue.
,
Apr 23 2018
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Apr 24 2018
Able to reproduce the issue on reported chrome version 66.0.3359.117 and on the latest canary 68.0.3404.0 using Windows 10, Ubuntu 14.04 and Mac 10.13.1 Bisect Information: =================== Last Good Build: 66.0.3349.0 First Bad Build: 66.0.3350.0 You are probably looking for a change made after 537252 (known good), but no later than 537253 (first known bad). CHANGELOG URL: https://chromium.googlesource.com/chromium/src/+log/0b888d00bb0f833067ea7a7efa27329c4a5e74de..35bb61db1c5a66208c46f0a3ed69df450df20793 Suspecting: https://chromium.googlesource.com/chromium/src/+/35bb61db1c5a66208c46f0a3ed69df450df20793 Review URL: https://chromium-review.googlesource.com/920965 @Kent Tamura: Please help in assigning it to the right owner if this is not related to your change. Adding RB-stable as this seems to be a recent regression, Please remove if not required. Thanks!
,
Apr 24 2018
See Issue 572693 . We had a bug that <script> in <template> was accidentally executed. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by susan.boorgula@chromium.org
, Apr 22 2018