Re: [w3ctag/design-reviews] "FYI" Review of new window.open() behavior (Issue #691)

@plinss and I took a look at this during our virtual f2f today.

We think that a boolean argument (`popup=0` or `popup=1`) is not extensible, if in the future authors want to select 
between more than these two kinds of window UI, whereas a keyword-based argument (e.g. `type=popup`)
would not have this problem.

As a side point, this sentence in the explainer was unclear:

> The window.open() API is currently confusing to use, in terms of trying to get it to open a popup vs. a tab/window. 

until I read [this section on MDN](https://developer.mozilla.org/en-US/docs/Web/API/Window/open#popup_condition):

> Most modern browsers (listed below) don't allow web content to control the visibility of UI parts separately.
> [snip]
> UI-related items of `windowFeatures` are used as a condition to whether opening a popup or a new tab, or a new window, and UI parts visibility of each of them is fixed.

Furthermore, we understand that this method has a long history, but if it were designed today we would strongly recommend using a dictionary instead of a serialized string that has to be parsed and re-serialized, see: https://github.com/w3ctag/design-principles/issues/213. It may be worth considering allowing users to pass a dictionary in place of this string for future enchancements, similarly to what was done for `addEventListener()`.

We generally encourage people to seek feedback before features have already shipped in browsers.
Given that this has already shipped in both Blink and Gecko, it seems too late to have any of our feedback taken on board. Therefore we're closing this issue, feel free to ping us if there's anything further to discuss.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/691#issuecomment-989990687

Received on Thursday, 9 December 2021 16:05:26 UTC