html
html copied to clipboard
Should `<a target="_blank">` and `window.open` consume the transient activation?
What is the issue with the HTML Standard?
https://html.spec.whatwg.org/multipage/document-sequences.html#the-rules-for-choosing-a-navigable checks for the transient activation without consuming it. Chromium seems to consume the transient activation in both <a target="_blank">
and window.open
cases per result of test. Gecko only consumes the activation in window.open
case. Webkit doesn't consume the activation in either case.
This seems like a good idea. Maybe @mustaqahmed can recall why we didn't specify this in the first place. Was it just because it wasn't interoperable, so we weren't sure everyone would be willing to do it?
Mentioning consumption in the spec makes sense to me.
... why we didn't specify this in the first place. Was it just because it wasn't interoperable, so we weren't sure everyone would be willing to do it?
That matches my understanding: popup blockers came into existence "organically" w/o a spec, and each browser had a slightly different implementation that just worked.
I believe another blocker for a possible consensus here is that popup blockers use few other signals (I mean "other than just user activation") like how allowed-sites are handled and the number or the frequency of popup requests. The list of signals used by each browser seems different (as far as I could sense from my 7-yr old experiment). Cataloging all signals used by each browsers could be a good first step if we expect to standardize popup blockers.
I'll likely start a PR for this soon if that sounds good?