Re: [Events] A case where on* attributes are required

On 12/23/11 2:09 PM, Ojan Vafai wrote:
> We could limit the performance impact by restricting to simple
> selectors. But that wouldn't completely address the performance issues
> and it would limit a lot of useful things you can do with this API.

If we restrict to just element IDs, and in particular to attaching to 
the first element with the given id, I think the performance impact 
becomes pretty close to nil (at least in Gecko).  I'm not sure how much 
of a problem that ends up being in practice, though.

> I'm curious what other browser developers think. Could this be done
> without significant performance impact?

That depends on how much the API is used, right?

If it's just a few selector-matching operations per mousemove or 
whatnot, that's not that bad performance-wise.... until people start 
writing crazy selectors.

-Boris

Received on Saturday, 24 December 2011 00:18:27 UTC