Re: [w3ctag/design-reviews] User Idle Detection (#336)

> Or would are there more precedent for configurations to be passed as the creation of EventTargets?

There is precedent. Perhaps the most relevant is the generic sensors API: https://w3c.github.io/sensors/

Which also brings up a good point that it seems you could model this with a constructor instead of a navigator.idle() method which returns a non-constructible object.

I might suggest following the generic sensor API as much as possible in naming and usage style. Although probably not by actually subclassing the Sensor class; it seems like you want a subset of that functionality.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/336#issuecomment-469849587

Received on Tuesday, 5 March 2019 20:43:40 UTC