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

Move default sensor check to start() #128

Closed
pozdnyakov opened this issue Sep 14, 2016 · 1 comment
Closed

Move default sensor check to start() #128

pozdnyakov opened this issue Sep 14, 2016 · 1 comment

Comments

@pozdnyakov
Copy link

As described in the specification, default sensor needs to be returned at sensor construction if no sensor options were given by the user, and an exception should be raised if default sensor does not exist.

This requirement leads to a problem: whereas construction is synchronous web engine has to know the real sensors data beforehand, which unnecessarily complicates the implementation of the spec.

@tobie
Copy link
Member

tobie commented Oct 28, 2016

Yes, we can make throwing async, here.

@tobie tobie changed the title default sensor check during sensor construction Move default sensor check to start() Oct 28, 2016
@tobie tobie self-assigned this Oct 28, 2016
tobie added a commit to tobie/sensors that referenced this issue Jan 26, 2017
This fixes a number of pending issues listed below,
for which there was consensus, but editing was still pending.

This introduces a dependency on the infra standard [[INFRA]],
to define precisely the low-level data structures
used by slots and concepts.

This also specifies slots more clearly.

Additionally, this rewrite sprinkles inline issues
in areas of the specs which require more work.

* Handle GC issues by getting rid of the SensorReading interface. 
  Closes w3c#153. Closes w3c#101.
* Check sensor existence before requesting permission. Closes w3c#145.
* Remove side effects from constructors. Closes w3c#138.
* Move default sensor check to start() and add "unconnected" state.
  Closes w3c#128 and closes w3c#104.
* Throttle update frequency to 60Hz by relying on
  requestAnimationFrame. Closes w3c#100.
tobie added a commit that referenced this issue Jan 26, 2017
This fixes a number of pending issues listed below,
for which there was consensus, but editing was still pending.

This introduces a dependency on the infra standard [[INFRA]],
to define precisely the low-level data structures
used by slots and concepts.

This also specifies slots more clearly.

Additionally, this rewrite sprinkles inline issues
in areas of the specs which require more work.

* Handle GC issues by getting rid of the SensorReading interface. 
  Closes #153. Closes #101.
* Check sensor existence before requesting permission. Closes #145.
* Remove side effects from constructors. Closes #138.
* Move default sensor check to start() and add "unconnected" state.
  Closes #128 and closes #104.
* Throttle update frequency to 60Hz by relying on
  requestAnimationFrame. Closes #100.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants