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

Convert Acceleration/RotationRate interfaces to dictionaries #90

Closed
wants to merge 1 commit into from

Conversation

saschanaz
Copy link
Member

@saschanaz saschanaz commented Nov 15, 2020

Fixes #89


Preview | Diff

@anssiko
Copy link
Member

anssiko commented Nov 16, 2020

Thanks, given Blink currently is the only implementation that exposes the interfaces (per #89), I'll defer to @reillyeon to understand web compat implications (I did not see any UseCounters in Blink that'd help here, but maybe I overlooked something).

I could imagine some existing web content might feature test against these interfaces, but I'd like to see some data on that.

@mkruisselbrink
Copy link

Per WebIDL attributes can not be dictionary types. As this seems to be changing the types of various attributes in DeviceMotionEvent to a dictionary, the result of that is invalid IDL.

(see https://heycam.github.io/webidl/#idl-attributes:

The type of the attribute, after resolving typedefs, must not be a nullable or non-nullable version of any of the following types: [...] a dictionary type

@saschanaz
Copy link
Member Author

Per WebIDL attributes can not be dictionary types. As this seems to be changing the types of various attributes in DeviceMotionEvent to a dictionary, the result of that is invalid IDL.

(see https://heycam.github.io/webidl/#idl-attributes:

The type of the attribute, after resolving typedefs, must not be a nullable or non-nullable version of any of the following types: [...] a dictionary type

Oh that's true! Sorry for bothering you, I'll file an issue at Web IDL instead.

@saschanaz
Copy link
Member Author

Okay, dictionaries are copied and thus not very good for attributes (ev.acceleration === ev.acceleration will return false), closing.

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

Successfully merging this pull request may close these issues.

Convert DeviceMotionEventAcceleration/RotationRate to dictionaries
3 participants