Re: QSA, the problem with :scope, and naming

2011-10-19 Thread Alex Russell
On Wed, Oct 19, 2011 at 2:26 AM, Boris Zbarsky bzbar...@mit.edu wrote: On 10/18/11 8:08 PM, Alex Russell wrote: The other excuse is that adding special cases (which is what you're asking for) slows down all the non-special-case codepaths.  That may be fine for _your_ usage of

Re: QSA, the problem with :scope, and naming

2011-10-19 Thread Alex Russell
On Wed, Oct 19, 2011 at 4:39 AM, Ojan Vafai o...@chromium.org wrote: Overall, I wholeheartedly support the proposal. I don't really see the benefit of allowing starting with a combinator. I think it's a rare case that you actually care about the scope element and in those cases, using :scope

Re: QSA, the problem with :scope, and naming

2011-10-19 Thread Anne van Kesteren
On Wed, 19 Oct 2011 17:22:46 +0900, Alex Russell slightly...@google.com wrote: Yehuda is representing jQuery. I'll take his opinion as the global view unless he choses to say he's representing a personal opinion. You misunderstand. Boris is contrasting with CSS. Selectors are used in more

Re: QSA, the problem with :scope, and naming

2011-10-19 Thread Yehuda Katz
Yehuda Katz (ph) 718.877.1325 On Wed, Oct 19, 2011 at 1:22 AM, Alex Russell slightly...@google.comwrote: On Wed, Oct 19, 2011 at 2:26 AM, Boris Zbarsky bzbar...@mit.edu wrote: On 10/18/11 8:08 PM, Alex Russell wrote: The other excuse is that adding special cases (which is what you're

Re: QSA, the problem with :scope, and naming

2011-10-19 Thread Alex Russell
On Wed, Oct 19, 2011 at 9:29 AM, Anne van Kesteren ann...@opera.com wrote: On Wed, 19 Oct 2011 17:22:46 +0900, Alex Russell slightly...@google.com wrote: Yehuda is representing jQuery. I'll take his opinion as the global view unless he choses to say he's representing a personal opinion. You

Re: QSA, the problem with :scope, and naming

2011-10-19 Thread Sean Hogan
On 19/10/11 2:39 PM, Ojan Vafai wrote: Overall, I wholeheartedly support the proposal. I don't really see the benefit of allowing starting with a combinator. I think it's a rare case that you actually care about the scope element and in those cases, using :scope is fine. Instead of

Re: QSA, the problem with :scope, and naming

2011-10-19 Thread Lachlan Hunt
On 2011-10-19 01:58, Tab Atkins Jr. wrote: Based on discussion on the mailing list,style scoped will be changing to the latter behavior as well, with the ability to invoke the former behavior in the rare circumstances when you explicitly want it. Despite some similarities in appearance, the

Re: QSA, the problem with :scope, and naming

2011-10-19 Thread Lachlan Hunt
On 2011-10-18 18:42, Alex Russell wrote: Related and equally important, that querySelector and querySelectorAll are often referred to by the abbreviation QSA suggests that its name is bloated and improved versions should have shorter names. I know the names suck. The names we ended up with

Re: QSA, the problem with :scope, and naming

2011-10-19 Thread Alex Russell
On Wed, Oct 19, 2011 at 1:54 PM, Lachlan Hunt lachlan.h...@lachy.id.au wrote: On 2011-10-18 18:42, Alex Russell wrote: Related and equally important, that querySelector and querySelectorAll are often referred to by the abbreviation QSA suggests that its name is bloated and improved versions

Re: QSA, the problem with :scope, and naming

2011-10-19 Thread Boris Zbarsky
On 10/19/11 4:22 AM, Alex Russell wrote: Yehuda is representing jQuery. I'll take his opinion as the global view unless he choses to say he's representing a personal opinion. Global jQuery view, yes? I stand by a slightly statement that what is common and needs to be fast for Yehuda may not

Re: QSA, the problem with :scope, and naming

2011-10-19 Thread Boris Zbarsky
On 10/19/11 4:29 AM, Anne van Kesteren wrote: On Wed, 19 Oct 2011 17:22:46 +0900, Alex Russell slightly...@google.com wrote: Yehuda is representing jQuery. I'll take his opinion as the global view unless he choses to say he's representing a personal opinion. You misunderstand. Boris is

Re: QSA, the problem with :scope, and naming

2011-10-19 Thread Boris Zbarsky
On 10/19/11 11:17 AM, Boris Zbarsky wrote: 4) Mapping Sizzle(#id) with document a context to getElementById(id). This isn't a valid optimization for querySelector because there can be multiple elements with the same id; And just as a note, since someone asked me off-list how this can possibly

[Bug 14513] New: WebSocket API: Missing reference for definition of MessageEvent

2011-10-19 Thread bugzilla
http://www.w3.org/Bugs/Public/show_bug.cgi?id=14513 Summary: WebSocket API: Missing reference for definition of MessageEvent Product: WebAppsWG Version: unspecified Platform: PC OS/Version: Windows NT Status: NEW

Re: QSA, the problem with :scope, and naming

2011-10-19 Thread Lachlan Hunt
On 2011-10-19 16:08, Alex Russell wrote: On Wed, Oct 19, 2011 at 1:54 PM, Lachlan Huntlachlan.h...@lachy.id.au wrote: I have attempted to address this problem before and the algorithm for parsing a *scoped selector string* (basically what you're calling a rootedSelector) existed in an old

Re: QSA, the problem with :scope, and naming

2011-10-19 Thread Lachlan Hunt
On 2011-10-18 18:42, Alex Russell wrote: HTMLDocument.prototype.find = HTMLElement.prototype.find = function(rootedSelector) { return this.querySelector(:scope + rootedSelector); } HTMLDocument.prototype.findAll = HTMLElement.prototype.findAll = function(rootedSelector)

Re: QSA, the problem with :scope, and naming

2011-10-19 Thread Tab Atkins Jr.
On Wed, Oct 19, 2011 at 5:17 AM, Lachlan Hunt lachlan.h...@lachy.id.au wrote: 1. Syntax In style scoped, selectors still can't begin with a combinator, but in the proposed API, they can. I agree with Lachy here. I think it's valuable to have consistency with style scoped, so that a selector

Re: QSA, the problem with :scope, and naming

2011-10-19 Thread Jonas Sicking
On Tue, Oct 18, 2011 at 9:42 AM, Alex Russell slightly...@google.com wrote: Lachlan and I have been having an...um...*spirited* twitter discussion regarding querySelectorAll, the (deceased?) queryScopedSelectorAll, and :scope. He asked me to continue here, so I'll try to keep it short: The

Re: QSA, the problem with :scope, and naming

2011-10-19 Thread Boris Zbarsky
On 10/19/11 10:07 PM, Jonas Sicking wrote: I like the general idea here. And since we're changing behavior, I think it's a good opportunity to come up with shorter names. Naming is really hard. The shorter names we use, the more likely it is that we're going to break webpages which are messing

Re: QSA, the problem with :scope, and naming

2011-10-19 Thread Tab Atkins Jr.
On Wed, Oct 19, 2011 at 7:22 PM, Ojan Vafai o...@chromium.org wrote: On Wed, Oct 19, 2011 at 7:07 PM, Jonas Sicking jo...@sicking.cc wrote: .findAll(body :scope div)  // returns nothing Wouldn't this return ids 1,2,3 if we're not prepending :scope as you say below? Yes, but he was

Re: Mouse Lock

2011-10-19 Thread Vincent Scheib
WebEvents WG is taking up this spec. I've created a new Mouse Lock thread on public-webevents: http://lists.w3.org/Archives/Public/public-webevents/2011OctDec/0066.html

Re: QSA, the problem with :scope, and naming

2011-10-19 Thread Jonas Sicking
On Wed, Oct 19, 2011 at 7:22 PM, Ojan Vafai o...@chromium.org wrote: On Wed, Oct 19, 2011 at 7:07 PM, Jonas Sicking jo...@sicking.cc wrote: On Tue, Oct 18, 2011 at 9:42 AM, Alex Russell slightly...@google.com wrote: Lachlan and I have been having an...um...*spirited* twitter discussion

Re: QSA, the problem with :scope, and naming

2011-10-19 Thread Jonas Sicking
On Wed, Oct 19, 2011 at 10:08 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Wed, Oct 19, 2011 at 7:22 PM, Ojan Vafai o...@chromium.org wrote: On Wed, Oct 19, 2011 at 7:07 PM, Jonas Sicking jo...@sicking.cc wrote: .findAll(body :scope div)  // returns nothing Wouldn't this return ids

Re: QSA, the problem with :scope, and naming

2011-10-19 Thread Jonas Sicking
On Tue, Oct 18, 2011 at 9:42 AM, Alex Russell slightly...@google.com wrote: Lachlan and I have been having an...um...*spirited* twitter discussion regarding querySelectorAll, the (deceased?) queryScopedSelectorAll, and :scope. He asked me to continue here, so I'll try to keep it short: The