github.com

Need hook for when a browsing context gains or loses focus · Issue #2711 · whatwg/html

  • ️Fri Jan 31 2025

@tobie

Description

@tobie

This is useful for the Generic Sensor API which needs to stop providing new sensor readings to a browsing context which has lost focus in order to prevent skimming attacks (e.g. inferring a password entered in a different browsing context from device movements captured by a gyroscope).

Reacting to lost focus might already possible to do right now, but it wasn't immediately obvious how to. Apologies if I missed something blatant.

My understanding is WebBluetooth and NFC have similar requirements. Pinging @jyasskin and @kenchris respectively.

Metadata

Labels

Development

No branches or pull requests

Issue actions