w3c / sensors

Generic Sensor API
https://www.w3.org/TR/generic-sensor/
Other
127 stars 59 forks source link

Currently focused area needs a top-level browsing context #436

Closed kenchris closed 6 months ago

kenchris commented 2 years ago

Sensor readings are only available for active documents whose origin is same origin-domain with the currently focused area document.

In Compute Pressure we do the following:

Let |topLevelBC| to the [=browsing context=] with [=top-level browsing context/system focus=] if one exists, or return false. Let |focusedDocument| be the |topLevelBC|'s currently focused area's [=Node/node document=]. If |relevantGlobal|'s [=relevant settings object=]'s [=origin=] is [=same origin-domain=] with |focusedDocument|'s [=origin=], return true.

rakuco commented 6 months ago

This ended up being fixed by #483.