<?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>20438</bug_id>
          
          <creation_ts>2012-12-19 00:09:51 +0000</creation_ts>
          <short_desc>[Custom]: consider adding &quot;inserted&quot; and &quot;removed&quot; lifecycle methods</short_desc>
          <delta_ts>2013-05-08 16:51:37 +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>HISTORICAL - Component Model</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>21660</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>18511</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="John Messerly">jmesserly</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          <cc>sjmiles</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>80381</commentid>
    <comment_count>0</comment_count>
    <who name="John Messerly">jmesserly</who>
    <bug_when>2012-12-19 00:09:51 +0000</bug_when>
    <thetext>If a component author needs to register an event on something other than their own shadow dom tree (perhaps something global accessed from window, or more likely Object.observe on a JS object), they need a way to unregister the handler so it doesn&apos;t leak the handler. Many of the popular web frameworks have some sort of &quot;destory&quot;/&quot;disposable&quot;/&quot;removed&quot; mechanism to help deal with this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80382</commentid>
    <comment_count>1</comment_count>
    <who name="Scott Miles">sjmiles</who>
    <bug_when>2012-12-19 00:17:41 +0000</bug_when>
    <thetext>Yes, we have encountered this issue also. To avoid dangling references, a component needs to know when it&apos;s inserted/removed from DOM. 

Perhaps an event when parentNode changes?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87429</commentid>
    <comment_count>2</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-05-08 16:51:37 +0000</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 21660 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>