<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>28753</bug_id>
          
          <creation_ts>2015-06-04 12:06:02 +0000</creation_ts>
          <short_desc>Allow returning SVGScriptElement from Document.currentScript too.</short_desc>
          <delta_ts>2016-03-22 09:54:08 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</resolution>
          
          
          <bug_file_loc>https://html.spec.whatwg.org/#dom-document-currentscript</bug_file_loc>
          <status_whiteboard>[good first bug]</status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>annevk</cc>
    
    <cc>fs</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>120697</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2015-06-04 12:06:02 +0000</bug_when>
    <thetext>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)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120698</commentid>
    <comment_count>1</comment_count>
    <who name="Fredrik S">fs</who>
    <bug_when>2015-06-04 12:08:36 +0000</bug_when>
    <thetext>Blink bug: https://code.google.com/p/chromium/issues/detail?id=495194</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122845</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2015-08-28 11:35:28 +0000</bug_when>
    <thetext>This requires adding a dependency on SVGScriptElement and SVG&apos;s script element. Using (HTMLScriptElement or SVGScriptElement) and talking about either HTML&apos;s or SVG&apos;s script element as the element being returned.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122849</commentid>
    <comment_count>3</comment_count>
    <who name="Fredrik S">fs</who>
    <bug_when>2015-08-28 12:26:31 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122858</commentid>
    <comment_count>4</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2015-08-28 15:19:38 +0000</bug_when>
    <thetext>It&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125585</commentid>
    <comment_count>5</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2016-03-22 09:54:08 +0000</bug_when>
    <thetext>https://github.com/whatwg/html/pull/913</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>