Re: [whatwg/dom] Shadow: define composedPath() (#247)

> @@ -733,6 +739,25 @@ attributes must return the values they were initialized to. When an
>  <a>event</a> is created the attributes must be
>  initialized to null.
>  
> +<p>The <dfn method for=Event><code>composedPath()</code></dfn> method, when invoked, must run these
> +steps:
> +
> +<ol>
> + <li><p>Let <var>composedPath</var> be a new empty list.
> +
> + <li><p>Let <var>currentTarget</var> be <a>context object</a>'s <code for=Event>currentTarget</code>
> + attribute value.
> +
> + <li>
> +  <p>For each <var>tuple</var> in <a>context object</a>'s <a for=Event>path</a>:
> +
> +  <ol><li><p>If <var>currentTarget</var> is a <a>node</a> and <var>tuple</var>'s <b>item</b> is an
> +  <a>unclosed node</a> of <var>currentTarget</var>, or <var>currentTarget</var> is <em>not</em> a
> +  <a>node</a>, then append <var>tuple</var>'s <b>item</b> to <var>composedPath</var>.</p></li></ol>

Well, path can contain both due to the `Window` object (exposed to JavaScript as the `WindowProxy` object), but that is only ever at the end. I will at a node that the ongoing assumption is that if the target is a non-node, the eventual path will also not contain nodes. I think that holds.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/247/files/ee90f5b11e586beb2fa3b06bee9b54ffb81bf072#r62821671

Received on Wednesday, 11 May 2016 12:25:32 UTC