Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vr event type names vs. event attribute names #160

Closed
andreasplesch opened this issue Dec 3, 2016 · 2 comments
Closed

vr event type names vs. event attribute names #160

andreasplesch opened this issue Dec 3, 2016 · 2 comments

Comments

@andreasplesch
Copy link

https://w3c.github.io/webvr/#interface-window

sensibly defines attribute names for various vr related events.

In the explanation of the attribute names, the language seems to equate the attribute name with the event type name.

However, event type names generally do not include the "on" prefix:

https://www.w3.org/TR/html51/webappapis.html#event-handlers-on-elements-document-objects-and-window-objects

The "onvrdisplayconnect" attribute's value would typically be an event listener's callback for the event of type "vrdisplayconnect", not "onvrdisplayconnect". Consequently, you would expect to use addEventListener("vrdisplayconnect", cb).

I believe this naming scheme is well established, so I am puzzled why webvr would deviate ? Unless I miss something ?

Does the event type name indeed include the "on" prefix for webvr ?

It may be necessary to explicitly define event type names or/and a mapping from event handler attribute names to event type names.

@cvan
Copy link
Contributor

cvan commented Dec 4, 2016

You are correct in calling this out. The IDL should use EventTarget. And we did some proposed interface changes to make the WebVR APIs work in a worker. See issue #152 and @Tojiro's PR: #116

@andreasplesch
Copy link
Author

Thanks, closing if I may. This issue is already well covered in #116 and its discussion. I see if I can follow the thrust of the discussion there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants