<?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>16487</bug_id>
          
          <creation_ts>2012-03-23 07:53:12 +0000</creation_ts>
          <short_desc>EventTarget constructor</short_desc>
          <delta_ts>2017-04-13 03:33:57 +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>Windows 3.1</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</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>
          <dependson>18780</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Anne">annevk</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>bugs</cc>
    
    <cc>erik.arvidsson</cc>
    
    <cc>mike</cc>
    
    <cc>odinho</cc>
    
    <cc>waldron.rick</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>65970</commentid>
    <comment_count>0</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-03-23 07:53:12 +0000</bug_when>
    <thetext>Define a way to construct an EventTarget with a modifiable parent chain. Suggestion from smaug:

[Constuctor]
interface EventReceiver : EventTarget {
  attribute EventTarget parent;
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75841</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-10-10 16:24:11 +0000</bug_when>
    <thetext>How were we going to deal with cycles here?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80091</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-12-13 10:59:19 +0000</bug_when>
    <thetext>Modifying the event parent seems problematic. If we instead pass the parent to the constructor there will never be a problem as far as I can tell.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80093</commentid>
    <comment_count>3</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2012-12-13 13:08:30 +0000</bug_when>
    <thetext>Why is modifying the parent problematic?
Nodes can be moved around and that isn&apos;t problematic.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80094</commentid>
    <comment_count>4</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2012-12-13 13:09:31 +0000</bug_when>
    <thetext>Though, I&apos;m not sure we need to support modifying .parent.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80176</commentid>
    <comment_count>5</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-12-14 11:00:07 +0000</bug_when>
    <thetext>The problem is that when you do event dispatch you need to compute the ancestor chain. If parent becomes settable, A can be a parent of B and B can be a parent of A, which thus far has been impossible and would require the introduction of cycle detection.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80180</commentid>
    <comment_count>6</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2012-12-14 13:27:26 +0000</bug_when>
    <thetext>Of course there would have to be cycle detection. Nodes have it too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82923</commentid>
    <comment_count>7</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-02-11 21:06:16 +0000</bug_when>
    <thetext>My suggestion is that we make it more explicit in the specification that EventTarget has an associated &quot;event parent&quot; concept (we need that anyway). We then allow that concept to be set through the constructor:

[Constructor(optional EventTarget = null)]
interface EventTarget ...

If we want we could expose that concept on the interface, but I don&apos;t think we need to do that right away. For nodes this is already covered by parentNode, for custom EventTarget objects this could be manually managed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100506</commentid>
    <comment_count>8</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-02-13 11:41:21 +0000</bug_when>
    <thetext>This does not seem high priority given the other things we have going on. JavaScript will prolly provide this in due course.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128531</commentid>
    <comment_count>9</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2017-04-13 03:33:57 +0000</bug_when>
    <thetext>https://github.com/whatwg/dom/issues/441</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>