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
These two are not compatible. See https://heycam.github.io/webidl/#idl-overloading-vs-union. With the current scheme, alert(undefined) would go to the second overload (with undefined stringified to "undefined"), while using an optional here would make that code function the same way as alert(). Executing alert(undefined) in web browsers seems to indicate that implementations currently use operation overloading.
We could change that behavior of course, but just wanted to make the point clear about compatibility.
https://html.spec.whatwg.org/multipage/window-object.html#the-window-object
How about merging them into
void alert(optional DOMString message);
?The text was updated successfully, but these errors were encountered: