<?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>25120</bug_id>
          
          <creation_ts>2014-03-21 19:10:15 +0000</creation_ts>
          <short_desc>Incorrect scope chain for window event handlers (should not include document)</short_desc>
          <delta_ts>2014-05-05 22:56:54 +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>FIXED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#event-handler-attributes</bug_file_loc>
          <status_whiteboard></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>bzbarsky</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>102760</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-03-21 19:10:15 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html
Multipage: http://www.whatwg.org/C#event-handler-attributes
Complete: http://www.whatwg.org/c#event-handler-attributes
Referrer: http://www.whatwg.org/specs/web-apps/current-work/multipage/

Comment:
Incorrect scope chain for window event handlers (should not include document)

Posted from: 98.110.194.132 by bzbarsky@mit.edu
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:31.0) Gecko/20100101 Firefox/31.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102761</commentid>
    <comment_count>1</comment_count>
      <attachid>1456</attachid>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-03-21 19:12:18 +0000</bug_when>
    <thetext>Created attachment 1456
Testcase

This interoperably alerts &quot;Body load handler scope chain: window&quot; in Safari, IE, Firefox, and Chrome, while per the spec as written right now it should be alerting &quot;Body load handler scope chain: document&quot;.  We need to fix the spec here.  The scope chain for the handler always starts with the event target, which in this case is the window.  Then if the event target is an element the scope chain includes the document and maybe the form.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104925</commentid>
    <comment_count>2</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-05-01 20:24:49 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r8595.
Check-in comment: Try to make event handler scope chains more accurate.
http://html5.org/tools/web-apps-tracker?from=8594&amp;to=8595</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104926</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-05-01 20:24:59 +0000</bug_when>
    <thetext>Is the new text sufficient? I&apos;m not sure I&apos;m using the JS spec terminology right.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104928</commentid>
    <comment_count>4</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-05-01 20:48:47 +0000</bug_when>
    <thetext>I don&apos;t know about that part either, offhand, but apart from that question looks good.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105125</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-05-05 22:56:54 +0000</bug_when>
    <thetext>Marking fixed; anyone who sees a problem with the text should please feel free to reopen or file a new bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>1456</attachid>
            <date>2014-03-21 19:12:18 +0000</date>
            <delta_ts>2014-03-21 19:12:18 +0000</delta_ts>
            <desc>Testcase</desc>
            <filename>test.html</filename>
            <type>text/html</type>
            <size>278</size>
            <attacher name="Boris Zbarsky">bzbarsky</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxoZWFkPgogIDxzY3JpcHQ+CiAgICB3aW5kb3cuZm9vID0gIndpbmRv
dyIKICAgIGRvY3VtZW50LmZvbyA9ICJkb2N1bWVudCI7CiAgPC9zY3JpcHQ+CjwvaGVhZD4KPGJv
ZHkgb25sb2FkPSJhbGVydCgnQm9keSBsb2FkIGhhbmRsZXIgc2NvcGUgY2hhaW46ICcgKyBmb28p
Ij4KICA8aW1nIHNyYz0iZGF0YTppbWFnZS9wbmcsIgogICAgICAgb25lcnJvcj0iYWxlcnQoJ0lt
YWdlIGVycm9yIGhhbmRsZXIgc2NvcGUgY2hhaW46ICcgKyBmb28pIj4KPC9ib2R5Pgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>