Open Bug 1498211 Opened 7 years ago Updated 3 years ago

Update to HTML spec changes for parsing the noopener/noreferrer features

Categories

(Core :: DOM: Core & HTML, enhancement, P2)

enhancement

Tracking

()

Tracking Status
firefox64 --- affected

People

(Reporter: zcorpan, Unassigned)

References

Details

Per this test case it seems noopener is not supported in window.open() in Firefox. (Did it work before?) http://web-platform-tests.live/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noopener.html (Need to allow popups.) When implementing this, noopener=0 and noopener=error should not set noopener. See https://github.com/whatwg/html/pull/4079 https://github.com/web-platform-tests/wpt/pull/13458
Nika, is it expected that this test will fail?
Flags: needinfo?(nika)
Priority: -- → P2
I think this is due to changes in how `noopener` is tokenized. IIRC it used to be tokenized in a special way, but now uses the more common generic mechanism. CC :bz who implemented the initial `noopener`.
Flags: needinfo?(nika)
ni? :bz who implemented noopener :-)
Flags: needinfo?(bzbarsky)
Bareword "noopener" works, yes? I just tested, and it does. That's the only thing that was expected to work when I implemented it. I haven't dug into the test and why it's failing to detect that; presumably it's not testing the simple case, except as part of tests that test other cases too or something. And certainly our parsing is not going to be aligned yet with a spec change that happened only 2 days ago...
Flags: needinfo?(bzbarsky)
Summary: Implement noopener for window.open() / parse noopener as a boolean feature → Update to HTML spec changes for parsing the noopener feature

The reason behind the test failures is that we're not using the algorithm in WinHasOption() which is more or less what the spec requires here now (the generic tokenization, that is...) But WinHasOption() as is isn't suitable to use here since we also need to remove what it parses here from the options string.

BTW we should make the same change to "noreferrer" being implemented in bug 1527287 as well.

Summary: Update to HTML spec changes for parsing the noopener feature → Update to HTML spec changes for parsing the noopener/noreferrer features

Also tested by html/browsers/the-window-object/window-open-noopener.html.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.