Remix.run Logo
xnx 3 hours ago

This will be a positive if browsers (extensions?) allow the ability to spoof visibility by site. Most websites have no business knowing if they're in the foreground or background.

madeofpalk 2 hours ago | parent | next [-]

Nice - you’ve just increased significantly power consumption of your browser!

Browsers will “slow down” various aspects of pages when they’re not visible, like animations or timers, to save on battery usage on laptops or phones.

Even if your remove explicit APIs for backgrounding, pages can still use heuristics to detect anyway.

chii 2 hours ago | parent [-]

The user should be making the choice - not the website. The website could be informed about being backgrounded, if the user chooses to. But the user should have the priority in the decision chain - their choice overrides any that the website makes.

That is what it means to have control over your own computing.

touwer 2 hours ago | parent | prev [-]

That's actually quite easy. onBlur, etc

reddalo 2 hours ago | parent [-]

Just to be precise, onBlur is a JavaScript event for an item that loses its focus, visibilitychange is what you actually need to detect tab changing.