Files
ladybird/Tests/LibWeb/Text/expected/HTML/session-storage-event-fired-to-lazy-window.txt
Shannon Booth cc711a6060 LibWeb/HTML: Fire storage events to windows without a Storage
Storage objects are created lazily when window.localStorage or
window.sessionStorage is first accessed. Previously, broadcast()
iterated over already-created Storage objects, so windows that had never
accessed these properties would not receive storage events.

Fix this by iterating over all active windows and initializing Storage
objects as part of the broadcast loop so all eligible windows receive
the event regardless of whether they had previously accessed
their storage property.
2026-03-16 13:55:07 +01:00

5 lines
71 B
Plaintext

key: my-key
oldValue: null
newValue: hello
storageArea: sessionStorage