This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28753 - Allow returning SVGScriptElement from Document.currentScript too.
Summary: Allow returning SVGScriptElement from Document.currentScript too.
Status: RESOLVED MOVED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: https://html.spec.whatwg.org/#dom-doc...
Whiteboard: [good first bug]
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-04 12:06 UTC by contributor
Modified: 2016-03-22 09:54 UTC (History)
3 users (show)

See Also:


Attachments

Description contributor 2015-06-04 12:06:02 UTC
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)
Comment 1 Fredrik S 2015-06-04 12:08:36 UTC
Blink bug: https://code.google.com/p/chromium/issues/detail?id=495194
Comment 2 Anne 2015-08-28 11:35:28 UTC
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.
Comment 3 Fredrik S 2015-08-28 12:26:31 UTC
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.
Comment 4 Anne 2015-08-28 15:19:38 UTC
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.
Comment 5 Anne 2016-03-22 09:54:08 UTC
https://github.com/whatwg/html/pull/913