- From: Andrew Fedoniouk <news@terrainformatica.com>
- Date: Sun, 13 Jul 2008 14:32:11 -0700
- To: fantasai <fantasai.lists@inkedblade.net>
- CC: Lachlan Hunt <lachlan.hunt@lachy.id.au>, www-style <www-style@w3.org>
fantasai wrote: >> >> The proposal can be found here: >> >> http://lists.w3.org/Archives/Public/www-archive/2008Jul/att-0019/Overview.html > > > Hi Lachlan, > > Have you considered handling these queries by passing an option > to querySelector that scopes the selector to the context node? > (Or in the case of HTML5 scoped style, defining a syntax for the > style element that does the same.) What are the advantages of > doing this with a pseudo-class instead of that approach? > > ~fantasai > Could elaborate more on what you mean? Say you want to select immediate child of the scope root element. <div> <div id=scopeRoot> <div> <div></div> </div> </div> </div> Then you would write is as: scopeRoot.selectChild(" > div", scopedLookup = true ); or scopeRoot.selectChild(":root > div", scopedLookup = true ); Is this what you mean? -- Andrew Fedoniouk. http://terrainformatica.com
Received on Sunday, 13 July 2008 21:33:08 UTC