Open
Description
Reproduction
- Send the test app to "saved messages"
- Open-close it a couple of times. You will see
beforeunload
(orvisibilitychange
) event count go up. - Open the app on another device. You will see that "webxdc.sendUpdate() worked..." is much higher than the corresponding event count.
This is because localStorage
is per-device, and webxdc.setUpdateListener
is shared.
The solution would be to add a unique ID for each device and only count webxdc updates from the current device in this piece of code:
Lines 14 to 48 in 72adcdc
Metadata
Metadata
Assignees
Labels
No labels