This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The fact that <script> element behaves differently when it is a child of <element> is bothersome. What are the alternatives?
Templates have already made a decision on this: <https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html#definitions> Namely that <script> is inert; so be it. If there is an applicable alternative it should be examined for use in the template case as well.
(In reply to comment #1) > Templates have already made a decision on this: > > <https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html#definitions> > > Namely that <script> is inert; so be it. If there is an applicable alternative > it should be examined for use in the template case as well. This is for when <script> is a child of <element>, not <template>. It is not inert, but is instead executed in a specially constructed scope.
Got it. If you want to run the script in a different context, I don’t see how you get around having different semantics. For example you could do <element onmumble="f()"> and fire onmumble after the child script has run. But then that script is running in the typical window context to define f.
http://dvcs.w3.org/hg/webcomponents/rev/15fded36e9c9