Add a pseudoElement attribute to transition events for the pseudo-element on which the transition happened.

Tue, 27 Mar 2012 13:26:29 -0700

author
L. David Baron <dbaron@dbaron.org>
date
Tue, 27 Mar 2012 13:26:29 -0700
changeset 5259
1a687c8d1e8a
parent 5258
bf3f36be697c
child 5260
b8e39646d638

Add a pseudoElement attribute to transition events for the pseudo-element on which the transition happened.

This is as raised in
http://lists.w3.org/Archives/Public/www-style/2012Feb/1083.html and
resolved in the 2012 March 7 teleconference (minutes at
http://lists.w3.org/Archives/Public/www-style/2012Mar/0195.html ).

We probably still need to discuss the naming, and also whether there are
any compatibility problems resulting from adding an argument to
initTransitionEvent.

css3-transitions/Overview.html file | annotate | diff | comparison | revisions
css3-transitions/Overview.src.html file | annotate | diff | comparison | revisions
     1.1 --- a/css3-transitions/Overview.html	Tue Mar 27 13:09:07 2012 -0700
     1.2 +++ b/css3-transitions/Overview.html	Tue Mar 27 13:26:29 2012 -0700
     1.3 @@ -991,11 +991,13 @@
     1.4    interface TransitionEvent : Event {
     1.5      readonly attribute DOMString          propertyName;
     1.6      readonly attribute float              elapsedTime;
     1.7 +    readonly attribute DOMString          pseudoElement;
     1.8      void               initTransitionEvent(in DOMString typeArg, 
     1.9                                            in boolean canBubbleArg, 
    1.10                                            in boolean cancelableArg, 
    1.11                                            in DOMString propertyNameArg,
    1.12 -                                          in float elapsedTimeArg);
    1.13 +                                          in float elapsedTimeArg,
    1.14 +                                          in DOMString pseudoElementArg);
    1.15    };
    1.16    </pre>
    1.17        </div>
    1.18 @@ -1024,6 +1026,20 @@
    1.19          class=property>transition-delay</code></a>.
    1.20        </dl>
    1.21  
    1.22 +      <dl>
    1.23 +       <dt> <code class=attribute-name><a
    1.24 +        id=Events-TransitionEvent-pseudoElement
    1.25 +        name=Events-TransitionEvent-pseudoElement>pseudoElement</a></code> of
    1.26 +        type <code>DOMString</code>, readonly
    1.27 +
    1.28 +       <dd> The name (beginning with two colons) of the CSS pseudo-element on
    1.29 +        which the transition occured (in which case the target of the event
    1.30 +        is that pseudo-element's corresponding element), or the empty string
    1.31 +        if the transition occurred on an element (which means the target of
    1.32 +        the event is that element). <span class=issue>The working group has
    1.33 +        not yet discussed the name of this property.</span>
    1.34 +      </dl>
    1.35 +
    1.36       <dt> <b>Methods</b>
    1.37  
    1.38       <dd>
    1.39 @@ -1067,14 +1083,29 @@
    1.40               <code>DOMString</code>
    1.41  
    1.42              <dd> Specifies the name of the property associated with the <a
    1.43 -             href="http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-Event"><code>Event</code></a>
    1.44 -             
    1.45 +             href="http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-Event"><code>Event</code></a>.
    1.46 +             (See the <a
    1.47 +             href="#Events-TransitionEvent-propertyName">propertyName</a>
    1.48 +             attribute.)
    1.49  
    1.50              <dt> <code class=parameter-name>elapsedTimeArg</code> of type
    1.51               <code>float</code>
    1.52  
    1.53              <dd> Specifies the amount of time, in seconds, the transition has
    1.54 -             been running at the time of initialization.
    1.55 +             been running at the time of initialization. (See the <a
    1.56 +             href="#Events-TransitionEvent-elapsedTime">elapsedTime</a>
    1.57 +             attribute.)
    1.58 +
    1.59 +            <dt> <code class=parameter-name>pseudoElementArg</code> of type
    1.60 +             <code>DOMString</code>
    1.61 +
    1.62 +            <dd> Specifies the pseudo-element on which the transition
    1.63 +             occurred. (See the <a
    1.64 +             href="#Events-TransitionEvent-pseudoElement">pseudoElement</a>
    1.65 +             attribute.) <span class=issue>The working group has not yet
    1.66 +             discussed the name of this argument.</span> <span
    1.67 +             class=issue>Does adding this additional argument create any
    1.68 +             compatibility problems?</span>
    1.69             </dl>
    1.70            </div>
    1.71           </div>
     2.1 --- a/css3-transitions/Overview.src.html	Tue Mar 27 13:09:07 2012 -0700
     2.2 +++ b/css3-transitions/Overview.src.html	Tue Mar 27 13:26:29 2012 -0700
     2.3 @@ -956,11 +956,13 @@
     2.4    interface TransitionEvent : Event {
     2.5      readonly attribute DOMString          propertyName;
     2.6      readonly attribute float              elapsedTime;
     2.7 +    readonly attribute DOMString          pseudoElement;
     2.8      void               initTransitionEvent(in DOMString typeArg, 
     2.9                                            in boolean canBubbleArg, 
    2.10                                            in boolean cancelableArg, 
    2.11                                            in DOMString propertyNameArg,
    2.12 -                                          in float elapsedTimeArg);
    2.13 +                                          in float elapsedTimeArg,
    2.14 +                                          in DOMString pseudoElementArg);
    2.15    };
    2.16    </pre>
    2.17                </div>
    2.18 @@ -985,6 +987,21 @@
    2.19                    The amount of time the transition has been running, in seconds, when this event fired. Note that this value is not affected by the value of <code class="property">transition-delay</code>.
    2.20                  </dd>
    2.21                </dl>
    2.22 +              <dl>
    2.23 +                <dt>
    2.24 +                  <code class='attribute-name'><a id="Events-TransitionEvent-pseudoElement" name='Events-TransitionEvent-pseudoElement'>pseudoElement</a></code> of type <code>DOMString</code>, readonly
    2.25 +                </dt>
    2.26 +                <dd>
    2.27 +                  The name (beginning with two colons) of the CSS
    2.28 +                  pseudo-element on which the transition occured (in
    2.29 +                  which case the target of the event is that
    2.30 +                  pseudo-element's corresponding element), or the empty
    2.31 +                  string if the transition occurred on an element (which
    2.32 +                  means the target of the event is that element).
    2.33 +                  <span class="issue">The working group has not yet
    2.34 +                  discussed the name of this property.</span>
    2.35 +                </dd>
    2.36 +              </dl>
    2.37              </dd>
    2.38              <dt>
    2.39                <b>Methods</b>
    2.40 @@ -1032,13 +1049,25 @@
    2.41                              <code class='parameter-name'>propertyNameArg</code> of type <code>DOMString</code>
    2.42                            </dt>
    2.43                            <dd>
    2.44 -                            Specifies the name of the property associated with the <a href='http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-Event'><code>Event</code></a>
    2.45 +                            Specifies the name of the property associated with the <a href='http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-Event'><code>Event</code></a>.
    2.46 +                            (See the <a href="#Events-TransitionEvent-propertyName">propertyName</a> attribute.)
    2.47                            </dd>
    2.48                            <dt>
    2.49                              <code class='parameter-name'>elapsedTimeArg</code> of type <code>float</code>
    2.50                            </dt>
    2.51                            <dd>
    2.52                              Specifies the amount of time, in seconds, the transition has been running at the time of initialization.
    2.53 +                            (See the <a href="#Events-TransitionEvent-elapsedTime">elapsedTime</a> attribute.)
    2.54 +                          </dd>
    2.55 +                          <dt>
    2.56 +                            <code class='parameter-name'>pseudoElementArg</code> of type <code>DOMString</code>
    2.57 +                          </dt>
    2.58 +                          <dd>
    2.59 +                            Specifies the pseudo-element on which the
    2.60 +                            transition occurred.
    2.61 +                            (See the <a href="#Events-TransitionEvent-pseudoElement">pseudoElement</a> attribute.)
    2.62 +                            <span class="issue">The working group has not yet discussed the name of this argument.</span>
    2.63 +                            <span class="issue">Does adding this additional argument create any compatibility problems?</span>
    2.64                            </dd>
    2.65                          </dl>
    2.66                        </div>

mercurial