RESOLVED FIXED304062
[WebDriver][BiDi] Implement script.realmCreated and script.realmDestroyed events
https://bugs.webkit.org/show_bug.cgi?id=304062
Summary [WebDriver][BiDi] Implement script.realmCreated and script.realmDestroyed events
Serge Deh
Reported 2025-12-12 06:07:38 PST
WebKit does not emit script.realmCreated and script.realmDestroyed events when JavaScript realms are created or destroyed during navigation. Per the WebDriver BiDi specification, these events should be emitted to notify clients when realm lifecycle changes occur: https://w3c.github.io/webdriver-bidi/#event-script-realmCreated https://w3c.github.io/webdriver-bidi/#event-script-realmDestroyed This prevents BiDi clients from tracking realm changes without polling script.getRealms. Example expected behavior: - Navigate to a page -> script.realmCreated emitted - Navigate away -> script.realmDestroyed emitted for old realm, realmCreated for new - Close context -> script.realmDestroyed emitted Initial implementation will cover window realms for main browsing contexts. Workers and iframes will be addressed in follow-up work. See also: bug 303926 (script.getRealms implementation)
Attachments
Radar WebKit Bug Importer
Comment 1 2025-12-19 06:08:13 PST
EWS
Comment 2 2026-04-03 12:17:50 PDT
Committed 310527@main (ccec5e43c699): <https://commits.webkit.org/310527@main> Reviewed commits have been landed. Closing PR #55793 and removing active labels.
EWS
Comment 3 2026-04-07 14:45:23 PDT
Committed 310738@main (6a6a378761be): <https://commits.webkit.org/310738@main> Reviewed commits have been landed. Closing PR #58221 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.