Bug 304062
| Summary: | [WebDriver][BiDi] Implement script.realmCreated and script.realmDestroyed events | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Serge Deh <serge.deh> |
| Component: | WebDriver | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | bburg, lmoura, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Serge Deh
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/166875337>
EWS
Committed 310527@main (ccec5e43c699): <https://commits.webkit.org/310527@main>
Reviewed commits have been landed. Closing PR #55793 and removing active labels.
EWS
Committed 310738@main (6a6a378761be): <https://commits.webkit.org/310738@main>
Reviewed commits have been landed. Closing PR #58221 and removing active labels.