This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Specification: https://html.spec.whatwg.org/ Multipage: https://html.spec.whatwg.org/multipage/#dom-document-currentscript Complete: https://html.spec.whatwg.org/#dom-document-currentscript Referrer: Comment: Allow returning SVGScriptElement from Document.currentScript too. Gecko implements it like this (has Element in the IDL), while Blink only supports this for HTMLScriptElement. Posted from: 212.247.211.200 User agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2376.0 Safari/537.36 OPR/31.0.1857.0 (Edition developer)
Blink bug: https://code.google.com/p/chromium/issues/detail?id=495194
This requires adding a dependency on SVGScriptElement and SVG's script element. Using (HTMLScriptElement or SVGScriptElement) and talking about either HTML's or SVG's script element as the element being returned.
That would be a bit unpleasant, yes. I noticed that the approach taken by Gecko is to use Element: http://lxr.mozilla.org/mozilla-central/source/dom/webidl/Document.webidl#165 (Pprobably just a hack of course - vcs archeology would tell I suppose...) which I imagine would need additional prose to limit what Elements can be returned.
It's not so bad I think. The main problem I think is that script execution is only well defined for HTML right now and SVG hangs a bit off the side rather than being part of it. I guess we can gloss over that for this issue though.
https://github.com/whatwg/html/pull/913