You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If more than two parameters are set for the document.open method, then it works like the window.open method. This page describes that case only if at most two parameters are set for the document.open method. For other cases, please see the page for the window.open method
I have no idea how all the different browsers behave here but don't really see the point in breaking people using the 4-argument variant for the sake of getting better argument names as proposed here (or maybe I'm missing something). Is there some case where you're getting an error that you shouldn't be?
Ryan Cavanaugh (@RyanCavanaugh) Problem with return type. When document.open called with 3 (or more) arguments -
return type should be Window | null. But now it returns Document
Upd. So I'm not against 4th argument (even though neither whatwg nor mdn describes it). I'm talking about return types
Activity
RyanCavanaugh commentedon Oct 9, 2019
See #31246
sirian commentedon Oct 9, 2019
Ryan Cavanaugh (@RyanCavanaugh) it's about document.open, not window.open
RyanCavanaugh commentedon Oct 9, 2019
http://help.dottoro.com/ljvkwlod.php
I have no idea how all the different browsers behave here but don't really see the point in breaking people using the 4-argument variant for the sake of getting better argument names as proposed here (or maybe I'm missing something). Is there some case where you're getting an error that you shouldn't be?
sirian commentedon Oct 10, 2019
Ryan Cavanaugh (@RyanCavanaugh) Problem with return type. When
document.opencalled with 3 (or more) arguments -return type should be
Window | null. But now it returnsDocumentUpd. So I'm not against 4th argument (even though neither whatwg nor mdn describes it). I'm talking about return types
RyanCavanaugh commentedon Oct 10, 2019
sirian my bad for missing the return type; thank you for clarifying!
jakebailey commentedon Jul 9, 2023
As of #44684,
Document'sopenis now: