Setting window.location.href to an invalid URL should throw a TypeError
Created attachment 435895 [details] Patch
Created attachment 436075 [details] Patch
red bubbles.
Created attachment 436223 [details] Patch
Comment on attachment 436223 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=436223&action=review > Source/WebCore/ChangeLog:8 > + This matches Firefox and the specification Looks like Chrome does throw an exception, right? Just not the right exception type? If so, the compatibility risk does seem low. > Source/WebCore/page/Location.cpp:281 > + return Exception { TypeError, "Invalid URL" }; nit: "Invalid URL"_s
Created attachment 436235 [details] Patch
(In reply to Chris Dumez from comment #5) > > Source/WebCore/ChangeLog:8 > > + This matches Firefox and the specification > > Looks like Chrome does throw an exception, right? Just not the right > exception type? Correct. I added this to the ChangeLog.
Committed r281472 (240851@main): <https://commits.webkit.org/240851@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 436235 [details].
<rdar://problem/82262275>