W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2012

Re: pointerLock vendor prefixes, shims and usability

From: Florian Bösch <pyalot@gmail.com>
Date: Mon, 24 Dec 2012 21:44:59 +0100
Message-ID: <CAOK8ODh3UamrseJtgngL7XcY10t3FoAqpZ2Qr24k8uANUASeoQ@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: Webapps WG <public-webapps@w3.org>
On Mon, Dec 24, 2012 at 9:31 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> That's fixed as of 3 days ago in Firefox nightlies, for what it's worth.
>
That's good to hear that more of this becomes shimable.


> Events already allocate a new object or ten, for what it's worth.
>
>  - vendorpointerlockchange events can likewise only be abstracted by
>> overriding HTMLElement's prototype which is a nogo.
>>
>
> Is this the same issue as above or something different?

It's related.

The movementX/movementY members of the event would need that something (for
every event) catches that event, assigns to event.movementX =
event.mozMovementX which you can only do if you override addEventListener
and override the passed in handler with a wrapper.

The vendorpointerlockchange event can only be shimed by overriding
addEventListener and adding vendor event name translation code.

I'm a bit concerned in doing these things to eventing because that stuff
gets called a lot and what's being done isn't straightforward (allocating
closures, regexing strings etc.) and that it could impact performance.


> That's a separate question.  I personally think prefixing has been
> over-used; this might be an instance of that over-use.

Imo yes. If you look at the documentation for this feature
https://developer.mozilla.org/en-US/docs/API/Pointer_Lock_API#example this
is so vendor prefix polluted it's barely readable at all.
Received on Monday, 24 December 2012 20:45:27 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:56 GMT