Intent to Ship: Make 'true' a truthy value for window.open boolean features

143 views
Skip to first unread message

Mason Freed

unread,
Mar 3, 2022, 4:23:53 PM3/3/22
to blink-dev

Contact emails

mas...@chromium.org

Explainer

https://github.com/whatwg/html/issues/7399

Specification

https://github.com/whatwg/html/pull/7425

Summary

This is a recent change [1] to the spec for parsing the windowFeatures argument to window.open(). Previous to this change, window.open(url,'','popup=true') interpreted the 'popup=true' to mean popup is false. With this change, 'true' counts as a truthy value. [1] https://github.com/whatwg/html/pull/7425



Blink component

Blink

Search tags

window.openwindowFeatures

TAG review

Extremely small change, and this was peripherally discussed on the TAG review for the recent addition of the popup windowFeature: https://github.com/w3ctag/design-reviews/issues/691

TAG review status

Not applicable

Risks



Interoperability and Compatibility

It is possible, though extremely unlikely, that a site currently uses `window.open(url,'','feature=true')` and expects feature to be false. In that case, this change will change behavior. However, this seems exceedingly unlikely.



Gecko: In development (https://github.com/whatwg/html/pull/7425#issuecomment-1058350502)

WebKit: Positive (https://github.com/whatwg/html/issues/7399#issuecomment-989971808)

Web developers: No signals

Other signals:

Ergonomics

No risks



Activation

No risks.



Security

No risks



Debuggability

Fully debuggable using existing DevTools support.



Is this feature fully tested by web-platform-tests?

Yes

Flag name



Requires code in //chrome?

False

Tracking bug

https://crbug.com/1277613

Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5669245760307200

This intent message was generated by Chrome Platform Status.

Daniel Bratell

unread,
Mar 4, 2022, 9:46:24 AM3/4/22
to Mason Freed, blink-dev

LGTM1.

The feedback from Mozilla and WebKit is not of the 100% official kind, but I agree that this is a small enough change to not request more formal feedback than the feedback that already is there.

(Also, "exceedingly unlikely", if I've learned anything about the web, it is that there is nothing that is too strange to exist on it).

/Daniel

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAM%3DNeDhYZ9nu-JdWdMS93E8AO8R39wqOWDo3pn3m6NFWqnjb6A%40mail.gmail.com.

Rick Byers

unread,
Mar 4, 2022, 10:27:53 AM3/4/22
to Daniel Bratell, Mason Freed, blink-dev
Make true truthy, who could object to that? :-) LGTM2

Seriously though, I agree on the sentiment of the low compat risk. This feels arguably bugfix-level to me. But I agree with Daniel that stranger things have happened in the world of web compat, so as always please keep an ear open for any regressions and revert / measure at the sign of any issues.

Rick

Mike Taylor

unread,
Mar 4, 2022, 10:33:27 AM3/4/22
to Rick Byers, Daniel Bratell, Mason Freed, blink-dev
LGTM3 - if anything I would expect things to unbreak (might be interesting to look at histograms for the number of popups opened before and after).

Mason Freed

unread,
Mar 4, 2022, 1:08:47 PM3/4/22
to Mike Taylor, Rick Byers, Daniel Bratell, blink-dev
Thank you all for the quick LGTMs. I appreciate the leniency on the "signals" requirements, and I'll definitely watch for issues. I agree that stranger things have happened than expecting =true to result in false.
Reply all
Reply to author
Forward
0 new messages