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

Modernize Gyroscope constructor steps #55

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

rakuco
Copy link
Member

@rakuco rakuco commented Oct 24, 2023

Adapt to Web IDL's current practices and be less hand-wavy when constructing
a Gyroscope instance:

  • We are given this so we do not need to say "let foo be a new instance of
    IDLInterface".
  • Similarly, there is no need to return anything from the "construct a
    gyroscope object" operation, it is only supposed to either initialize
    this or throw an exception.
  • Pass the right argument with the right type to "check sensor
    policy-controlled features".

Preview | Diff

Adapt to Web IDL's current practices and be less hand-wavy when constructing
a Gyroscope instance:
- We are given `this` so we do not need to say "let foo be a new instance of
  IDLInterface".
- Similarly, there is no need to return anything from the "construct a
  gyroscope object" operation, it is only supposed to either initialize
  `this` or throw an exception.
- Pass the right argument with the right type to "check sensor
  policy-controlled features".
@rakuco rakuco requested a review from anssiko October 24, 2023 15:28
@anssiko anssiko merged commit 1aa906b into w3c:main Oct 25, 2023
2 checks passed
github-actions bot added a commit that referenced this pull request Oct 25, 2023
SHA: 1aa906b
Reason: push, by anssiko

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@rakuco rakuco deleted the modernize-object-construction branch October 25, 2023 07:13
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.

3 participants