<?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>23669</bug_id>
          
          <creation_ts>2013-10-29 08:17:34 +0000</creation_ts>
          <short_desc>[Custom]: &quot;leftView&quot; type of callbacks should not be called on &quot;this document has a browsing context&quot;</short_desc>
          <delta_ts>2013-11-11 08:07:05 +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>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</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>
          
          <blocked>14968</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Tetsuharu OHZEKI">ohzeki-tetsuharu</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>95509</commentid>
    <comment_count>0</comment_count>
    <who name="Tetsuharu OHZEKI">ohzeki-tetsuharu</who>
    <bug_when>2013-10-29 08:17:34 +0000</bug_when>
    <thetext>[reproducible revision]
http://www.w3.org/TR/2013/WD-custom-elements-20131024/

In this spec revision, 5.2 Types of Callbacks defines &quot;leftView&quot; type like this:
&gt; Unless specified otherwise, this callback must be enqueued whenever custom
&gt; element is removed from the document and this document has a browsing context.

But this last sentence, &quot;this callback must be enqueued whenever ... this document has a browsing context&quot;, is same sentence as the definition of &quot;enteredView&quot;:
&gt; Unless specified otherwise, this callback must be enqueued whenever custom
&gt; element is removed from the document and this document has a browsing context.

I think the definition of &quot;leftView&quot; should be &quot;this document lost a browsing context&quot; from the viewpoint of symmetry between &quot;enteredView&quot; and &quot;leftView&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96038</commentid>
    <comment_count>1</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-11-08 20:48:39 +0000</bug_when>
    <thetext>(In reply to Tetsuharu OHZEKI from comment #0)
&gt; [reproducible revision]
&gt; http://www.w3.org/TR/2013/WD-custom-elements-20131024/
&gt; 
&gt; In this spec revision, 5.2 Types of Callbacks defines &quot;leftView&quot; type like
&gt; this:
&gt; &gt; Unless specified otherwise, this callback must be enqueued whenever custom
&gt; &gt; element is removed from the document and this document has a browsing context.
&gt; 
&gt; But this last sentence, &quot;this callback must be enqueued whenever ... this
&gt; document has a browsing context&quot;, is same sentence as the definition of
&gt; &quot;enteredView&quot;:
&gt; &gt; Unless specified otherwise, this callback must be enqueued whenever custom
&gt; &gt; element is removed from the document and this document has a browsing context.
&gt; 
&gt; I think the definition of &quot;leftView&quot; should be &quot;this document lost a
&gt; browsing context&quot; from the viewpoint of symmetry between &quot;enteredView&quot; and
&gt; &quot;leftView&quot;.

This is intentional. &quot;leftView&quot; is only called when the element&apos;s document changes, not when the document changes itself.

One motivation here is avoid slowing down destruction of the document by invoking a bunch of callbacks on its elements.

If you have a specific use case that you feel needs to be address, please reopen the bug and post it here :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96100</commentid>
    <comment_count>2</comment_count>
    <who name="Tetsuharu OHZEKI">ohzeki-tetsuharu</who>
    <bug_when>2013-11-11 04:28:14 +0000</bug_when>
    <thetext>(In reply to Dimitri Glazkov from comment #1)
&gt; This is intentional. &quot;leftView&quot; is only called when the element&apos;s document
&gt; changes, not when the document changes itself.
&gt; 
&gt; One motivation here is avoid slowing down destruction of the document by
&gt; invoking a bunch of callbacks on its elements.

So do you mean these?:
* &quot;leftView&quot; is only called when changing the document which is the ancestor of the element.
* &quot;leftView&quot; is not called when changing the document which is the ancestor of the element.

If you said them, I understand with your account.
However, I seems the spec description　are complex...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96102</commentid>
    <comment_count>3</comment_count>
    <who name="Tetsuharu OHZEKI">ohzeki-tetsuharu</who>
    <bug_when>2013-11-11 04:38:33 +0000</bug_when>
    <thetext>(In reply to Dimitri Glazkov from comment #1)
&gt; This is intentional. &quot;leftView&quot; is only called when the element&apos;s document
&gt; changes, not when the document changes itself.
&gt; 
&gt; One motivation here is avoid slowing down destruction of the document by
&gt; invoking a bunch of callbacks on its elements.
&gt; 
&gt; If you have a specific use case that you feel needs to be address, please
&gt; reopen the bug and post it here :)

Ah, I have the one more question about it. Will &quot;leftView&quot; not be called when &quot;unload&quot; event is dispatched on the element&apos;s document? I feel that this spec avoids it intentionally from your comment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96104</commentid>
    <comment_count>4</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-11-11 05:20:11 +0000</bug_when>
    <thetext>(In reply to Tetsuharu OHZEKI from comment #3)
&gt; (In reply to Dimitri Glazkov from comment #1)
&gt; &gt; This is intentional. &quot;leftView&quot; is only called when the element&apos;s document
&gt; &gt; changes, not when the document changes itself.
&gt; &gt; 
&gt; &gt; One motivation here is avoid slowing down destruction of the document by
&gt; &gt; invoking a bunch of callbacks on its elements.
&gt; &gt; 
&gt; &gt; If you have a specific use case that you feel needs to be address, please
&gt; &gt; reopen the bug and post it here :)
&gt; 
&gt; Ah, I have the one more question about it. Will &quot;leftView&quot; not be called
&gt; when &quot;unload&quot; event is dispatched on the element&apos;s document? I feel that
&gt; this spec avoids it intentionally from your comment.

Right. This callback is only called when the element is moved, not when the document&apos;s state is changed. The spec is very clear on that.

Unload event is perfectly usable all by itself, there&apos;s no reason to duplicate its functionality in a callback.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96112</commentid>
    <comment_count>5</comment_count>
    <who name="Tetsuharu OHZEKI">ohzeki-tetsuharu</who>
    <bug_when>2013-11-11 08:07:05 +0000</bug_when>
    <thetext>(In reply to Dimitri Glazkov from comment #4)
&gt; Right. This callback is only called when the element is moved, not when the
&gt; document&apos;s state is changed. The spec is very clear on that.

OK.　I understand its behavior.

&gt; Unload event is perfectly usable all by itself, there&apos;s no reason to
&gt; duplicate its functionality in a callback.

Aha, I agree it.

Thank you for your account.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>