- From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
- Date: Sun, 27 Nov 2011 21:39:07 +0100
- To: Jonas Sicking <jonas@sicking.cc>
- CC: "public-webapps@w3.org" <public-webapps@w3.org>
On 2011-11-27 21:29, Jonas Sicking wrote:
> Here is what I sent to the list on Nov 10th. Though it didn't get archived
> so maybe it didn't go through properly:
> ...
I'll review your algorithm and respond to that a bit later.
>> foo.find(">label /for/ input+:scope~span)
>
> Can this expression ever match anything if we prepend ":scope"? Would
> simply removing step 5 above make the steps work for this case too?
Yes.
<p>
<input id="x">
<strong>
<label for="x">X</label>
</strong>
<span>...</span>
</p>
var foo = document.find("strong");
foo.find(">label /for/ input+:scope~span);
After prepending :scope, that will match the span element.
--
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/
Received on Sunday, 27 November 2011 20:39:40 UTC