Re: window.find already exists

On Mon, Nov 21, 2011 at 11:29 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> That only interferes if .find() for selectors is defined on window.
> qSA is only defined on Document and Element, though, and I see no
> reason that .find wouldn't be the same.

So then we get another built-in method that will do different things
if you call it by its bare name in an on* attribute vs. in normal JS?
find() in on* would be document.find(), while anywhere else it would
be window.find().  I ran into this once with getSelection() on window
vs. document, when Gecko had different implementations for the two,
and it was really confusing -- there was no way I'd have figured it
out if I were a typical web author.

Hopefully we can just drop window.find(), though.

Received on Tuesday, 22 November 2011 01:34:44 UTC