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/

Reply via email to