Fix: Return error and avoid panicking in SetOpener function (#33002)

* Fix: Return error and avoid panicking in SetOpener function

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* eturn JSFailed onstead of InvalidState

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* Update wpt test result

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

---------

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
This commit is contained in:
Taym Haddadi 2024-08-12 09:58:00 +02:00 committed by GitHub
parent a797969efe
commit df8ccafa7c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 22 additions and 21 deletions

View file

@ -36,7 +36,7 @@
// Note that this can return null in the case that the browsing context has been discarded.
// https://github.com/whatwg/html/issues/2115
[LegacyUnforgeable, CrossOriginReadable] readonly attribute WindowProxy? top;
[CrossOriginReadable] attribute any opener;
[Throws, CrossOriginReadable] attribute any opener;
// Note that this can return null in the case that the browsing context has been discarded.
// https://github.com/whatwg/html/issues/2115
[Replaceable, CrossOriginReadable] readonly attribute WindowProxy? parent;