-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify Window's focus() and blur() #4377
Conversation
In particular when there's a null browsing context, for #4363. Tests: web-platform-tests/wpt#15460.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some ways to make this even better, but feel free to push back if you feel that I'm scope-creeping.
provides a hint to the user agent that the script believes the user probably is not currently | ||
interested in the contents of this <code>Window</code> object's <span data-x="window bc">browsing | ||
context</span>, if non-null, but that the contents might become interesting again in the | ||
future.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could become a three-step algorithm.
- User agents should return at this point, causing the method to do nothing.
- If the BC is null, return.
- If this point is reached, then the page author has provided a hint...
Note that it does nothing in Blink (1, 2). It seems to do something in Safari, sometimes (1, 2). I couldn't untangle Gecko's mess of window-related classes enough to find the blur method implementation there.
I've fixed the minor nits, but let's leave the bigger |
…xt, a=testonly Automatic update from web-platform-tests HTML: window.focus() sans browsing context For whatwg/html#4377. -- wpt-commits: 84a44957233c13fb21f5d97b06db1d89076fb144 wpt-pr: 15460
…xt, a=testonly Automatic update from web-platform-tests HTML: window.focus() sans browsing context For whatwg/html#4377. -- wpt-commits: 84a44957233c13fb21f5d97b06db1d89076fb144 wpt-pr: 15460
…xt, a=testonly Automatic update from web-platform-tests HTML: window.focus() sans browsing context For whatwg/html#4377. -- wpt-commits: 84a44957233c13fb21f5d97b06db1d89076fb144 wpt-pr: 15460
…xt, a=testonly Automatic update from web-platform-tests HTML: window.focus() sans browsing context For whatwg/html#4377. -- wpt-commits: 84a44957233c13fb21f5d97b06db1d89076fb144 wpt-pr: 15460
…xt, a=testonly Automatic update from web-platform-tests HTML: window.focus() sans browsing context For whatwg/html#4377. -- wpt-commits: 84a44957233c13fb21f5d97b06db1d89076fb144 wpt-pr: 15460 UltraBlame original commit: 4e667891d3088a94002b74336f2a6ab7933d0d21
…xt, a=testonly Automatic update from web-platform-tests HTML: window.focus() sans browsing context For whatwg/html#4377. -- wpt-commits: 84a44957233c13fb21f5d97b06db1d89076fb144 wpt-pr: 15460 UltraBlame original commit: d3eedffa9545cd523e3632aac00c7336c056cbc6
…xt, a=testonly Automatic update from web-platform-tests HTML: window.focus() sans browsing context For whatwg/html#4377. -- wpt-commits: 84a44957233c13fb21f5d97b06db1d89076fb144 wpt-pr: 15460 UltraBlame original commit: 4e667891d3088a94002b74336f2a6ab7933d0d21
…xt, a=testonly Automatic update from web-platform-tests HTML: window.focus() sans browsing context For whatwg/html#4377. -- wpt-commits: 84a44957233c13fb21f5d97b06db1d89076fb144 wpt-pr: 15460 UltraBlame original commit: d3eedffa9545cd523e3632aac00c7336c056cbc6
…xt, a=testonly Automatic update from web-platform-tests HTML: window.focus() sans browsing context For whatwg/html#4377. -- wpt-commits: 84a44957233c13fb21f5d97b06db1d89076fb144 wpt-pr: 15460 UltraBlame original commit: 4e667891d3088a94002b74336f2a6ab7933d0d21
…xt, a=testonly Automatic update from web-platform-tests HTML: window.focus() sans browsing context For whatwg/html#4377. -- wpt-commits: 84a44957233c13fb21f5d97b06db1d89076fb144 wpt-pr: 15460 UltraBlame original commit: d3eedffa9545cd523e3632aac00c7336c056cbc6
In particular when there's a null browsing context, for #4363.
Tests: web-platform-tests/wpt#15460.
/interaction.html ( diff )