W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2011

Re: Remaining Problems with Explicit :scope Switching in find/findAll

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Sun, 27 Nov 2011 21:39:07 +0100
Message-ID: <4ED29FEB.3040801@lachy.id.au>
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?


   <input id="x">
     <label for="x">X</label>

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
Received on Sunday, 27 November 2011 20:39:40 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 11 February 2015 14:36:55 UTC