<?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>23095</bug_id>
          
          <creation_ts>2013-08-30 00:02:37 +0000</creation_ts>
          <short_desc>&quot;Call listener&apos;s callback&apos;s handleEvent, with th...&quot;</short_desc>
          <delta_ts>2014-02-12 19:47:59 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>DOM</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ian &apos;Hixie&apos; Hickson">ian</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>bugs</cc>
    
    <cc>dglazkov</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>morrita</cc>
    
    <cc>www-dom</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>92720</commentid>
    <comment_count>0</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-08-30 00:02:37 +0000</bug_when>
    <thetext>http://dom.spec.whatwg.org/#dispatching-events

When invoking event listeners:

[[
Call listener&apos;s callback&apos;s handleEvent, with the event passed to this algorithm as the first argument and event&apos;s currentTarget attribute value as callback this value.
]]

We should probably not do this if the event handler&apos;s Document is not an active document, right? Does that belong in DOM?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92721</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-08-30 00:03:08 +0000</bug_when>
    <thetext>(We should probably test what browsers do.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92730</commentid>
    <comment_count>2</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-08-30 04:05:47 +0000</bug_when>
    <thetext>This might be of interest to you:

https://groups.google.com/a/chromium.org/d/topic/blink-dev/QHnejis4Yv4/discussion

Also, Morrita-san is landing this right now in Blink.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92731</commentid>
    <comment_count>3</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2013-08-30 10:15:59 +0000</bug_when>
    <thetext>Dispatching events doesn&apos;t depend on whether or not the document is active
or data document. Also just dispatching events in a disconnected subtree should work.

In Gecko event listeners do work, but event handlers in data documents aren&apos;t
registered.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92732</commentid>
    <comment_count>4</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-08-30 10:38:00 +0000</bug_when>
    <thetext>Dimitri, that&apos;s not about document being active, but about whether it has an associated browsing context.

I think what Olli says is correct, though creating test cases for inactive documents is hard. That&apos;s basically only documents you have navigated away from, right?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92733</commentid>
    <comment_count>5</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2013-08-30 10:45:22 +0000</bug_when>
    <thetext>Oh, active still... so Gecko doesn&apos;t end up calling listeners or handlers
on a document which isn&apos;t &quot;active&quot;, for example is in bfcache.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92734</commentid>
    <comment_count>6</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2013-08-30 10:46:27 +0000</bug_when>
    <thetext>But I&apos;ve always thought that is an implementation limitation, a bug, in Gecko.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>