Re: [sensors] Use simple event dispatch mechanism instead of task source (queued)

> As an internal slot, it can still have side effects on the JS side.

Then it would be bug for the browser that introduces such side effects, internal implementation should not affect specified behavior.

> But this is implementation specific, it is not specified by the spec, is it?

Well, we had consensus that it should be true for event loop turn. If that is not in the spec, maybe we should reflect that agreement, do you want me to make PR for that? :smile:

> I don't think it is, tbh.

I think tbh :) and we have tests for that that actually work.

> I think we could replace this whole "reporting flag thing" by simply adding the whole "Update latest reading" in a new task.

- Do you want to keep task source event processing model?
- New task for what task queue, from what task source?
- Do you know how this is implemented in browsers?
- Do you know how to fix sync side-effects when we have single sensor.reading and multiple tasks in queue?

As I mentioned in this issue, event queues are overkill for such simple event processing model.

-- 
GitHub Notification of comment by alexshalamov
Please view or discuss this issue at https://github.com/w3c/sensors/issues/215#issuecomment-304308665 using your GitHub account

Received on Friday, 26 May 2017 15:12:05 UTC