part of ACTION-37: Add uiActions interface and explain receiver attr of UIRequestEvent
authorJames Craig <jcraig@apple.com>
Mon, 17 Dec 2012 14:15:06 -0800
changeset 53b2f4df14aa49
parent 52 4911b8b9b83b
child 54 0003ae7b0d3e
part of ACTION-37: Add uiActions interface and explain receiver attr of UIRequestEvent
src/include/terms.html
src/indie-ui-events.html
     1.1 --- a/src/include/terms.html	Mon Dec 17 12:07:22 2012 -0800
     1.2 +++ b/src/include/terms.html	Mon Dec 17 14:15:06 2012 -0800
     1.3 @@ -13,6 +13,9 @@
     1.4  		<p class="ednote">Depending on the context, this is either the element under the pointer (e.g. mouse cursor), the currently focused element (document.activeElement), or an element that the assistive technology determines to be the subject of the user's attention.</p>
     1.5  	</dd>
     1.6  	
     1.7 +	<dt id="def_reflected_attribute">Reflected Attribute</dt>
     1.8 +	<dd>Attributes whose DOM property and content attribute values remain in sync. Identical to <a href="http://dev.w3.org/html5/spec-preview/common-dom-interfaces.html#reflect" class="todo">reflected attributes in HTML</a>.</dd>
     1.9 +	
    1.10  	<dt id="def_request_event_receiver">Request Event Receiver</dt>
    1.11  	<dd class="placeholder">
    1.12  		TBD
     2.1 --- a/src/indie-ui-events.html	Mon Dec 17 12:07:22 2012 -0800
     2.2 +++ b/src/indie-ui-events.html	Mon Dec 17 14:15:06 2012 -0800
     2.3 @@ -104,13 +104,24 @@
     2.4  		</section>
     2.5  		<!-- :::::::::::::::::::: END INTRO :::::::::::::::::::: -->
     2.6  		
     2.7 -		<!-- :::::::::::::::::::: Actions Attribute :::::::::::::::::::: -->
     2.8 +		<!-- :::::::::::::::::::: UI Actions :::::::::::::::::::: -->
     2.9  		<section id="actions">
    2.10  			<h2><abbr title="User Interface">UI</abbr> Actions</h2>
    2.11 -			<p>User interface actions are declared as enumerated attribute values on an element. Each value corresponds to a specific <a href="#RequestEvents">UI Request Event</a>, and declares the web page author's ability to receive and handle each of the request events initiated by the user agent. In order to receive each request event, authors MUST also register for the event using  <code>Element.addEventListener()</code> at this node or higher in the DOM. User agents MUST NOT initiate a <a href="#RequestEvents">UI Request Event</a> when the user's <a href="#def_point_of_regard">point-of-regard</a> is not inside an element with the corresponding defined action.</p>
    2.12 +			<p>User interface actions are declared as enumerated token attribute values on an element. Each value corresponds to a specific <a href="#RequestEvents">UI Request Event</a>, and declares the web page author's ability to receive and handle each of the request events initiated by the user agent. In order to receive each request event, authors MUST also register for the event using  <code>Element.addEventListener()</code> at this node or higher in the DOM. User agents MUST NOT initiate a <a href="#RequestEvents">UI Request Event</a> when the user's <a href="#def_point_of_regard">point-of-regard</a> is not inside an element with the corresponding defined action.</p>
    2.13 +			
    2.14 +			<section id="uiActions">
    2.15 +				<h2>The <code>uiActions</code> IDL Attribute</h2>
    2.16 +				<p>The <code>uiActions</code> attribute of the Element interface MUST return a DOMString <a href="#def_reflected_attribute">reflecting</a> the <a href="#ui-actions"><code>ui-actions</code></a> content attribute.</p>
    2.17 +				<dl title="partial interface Element" class="idl">
    2.18 +					<dt>attribute DOMString uiActions</dt>
    2.19 +					<dd>A attribute whose string value <a href="#def_reflected_attribute">reflects</a> the <a href="#ui-actions"><code>ui-actions</code></a> content attribute.</dd>
    2.20 +				</dl>
    2.21 +			</section>
    2.22 +			
    2.23  			<section id="ui-actions">
    2.24 -				<h3>The <code>ui-actions</code> attribute</h3>
    2.25 -				<p>The <code>ui-actions</code> content attribute is an <a href="http://www.w3.org/TR/2011/WD-html5-20110405/common-microsyntaxes.html#enumerated-attribute" class="todo">enumerated attribute</a> accepting zero or more of the following values, separated by whitespace:</p>
    2.26 +				<h3>The <code>ui-actions</code> Content Attribute</h3>
    2.27 +				<p>Every element may have a <code>ui-actions</code> attribute specified. The attribute, if specified, must have a value that is a set of whitespace-separated tokens representing the various actions to which the web application responds on behalf of this element. The actions that an element has assigned to it consists of all the tokens returned when the value of the <code>ui-actions</code> attribute is split on whitespace. (Duplicates are ignored.)</p>
    2.28 +				<p>User agents MUST <a href="#def_reflected_attribute">reflect</a> the <code>ui-actions</code> content attribute in the <a href="#uiActions"><code>uiActions</code></a> IDL attribute.</p>
    2.29  				<div data-transform="listActions"><!-- dynamically generates event list --></div>
    2.30  				<p class="ednote">We could probably combine the 'manipulation' events into a single 'manipulation' action value. I don't foresee a case where an author would want to receive some, but not all of them, and even if that case exists, the author could just not listen for those specific events.</p>
    2.31  				<pre class="example">
    2.32 @@ -129,10 +140,11 @@
    2.33  					  document.body.addEventListener(<strong>'zoomrequest'</strong>, handleZoom);
    2.34  					&lt;/script&gt;
    2.35  				</pre>
    2.36 -				<p class="note">In the previous example, 'undorequest' and 'redorequest' events could be fired any time the user's point-of-regard was inside the document. However, the 'dismissrequest' would only be fired when the user's point-of-regard was inside the dialog. Likewise, the 'panrequest' and 'zoomrequest' would only be fired when the user's <a href="#def_point_of_regard">point-of-regard</a> was inside the map view.
    2.37 +				<p class="note">In the previous example, 'undorequest' and 'redorequest' events could be fired any time the user's point-of-regard was inside the document. However, the 'dismissrequest' would only be fired when the user's point-of-regard was inside the dialog. Likewise, the 'panrequest' and 'zoomrequest' would only be fired when the user's <a href="#def_point_of_regard">point-of-regard</a> was inside the map view.</p>
    2.38  			</section>
    2.39 +
    2.40  		</section>
    2.41 -		<!-- :::::::::::::::::::: End Actions Attribute :::::::::::::::::::: -->
    2.42 +		<!-- :::::::::::::::::::: End UI Actions :::::::::::::::::::: -->
    2.43  		
    2.44  		<!-- :::::::::::::::::::: UI Request Event Interfaces :::::::::::::::::::: -->
    2.45  		<section id="RequestEvents">
    2.46 @@ -151,6 +163,9 @@
    2.47  					<dt>readonly attribute DOMString typeArg</dt>
    2.48  					<dd>The type of event (e.g., <code>undorequest</code>, <code>redorequest</code>).</dd>
    2.49  
    2.50 +					<dt>readonly attribute EventTarget receiver</dt>
    2.51 +					<dd>In addition to the target and currentTarget, each UI Request Event has a receiver element, which is declared via the <a href="#ui-actions"><code>ui-actions</code></a> content attribute on an ancestor node of the event target.</dd>
    2.52 +
    2.53  					<dt>readonly attribute boolean canBubbleArg</dt>
    2.54  					<dd></dd>
    2.55