Skip to content

fix: event (e.g. visibilitychange) on DC Android - #51

Open
WofWca wants to merge 1 commit into
masterfrom
wofwca/fix-visibilitychange-test
Open

WofWca wants to merge 1 commit into
masterfrom
wofwca/fix-visibilitychange-test

Conversation

@WofWca

@WofWca WofWca commented Jun 5, 2026

Copy link
Copy Markdown
Member

The test would falsely report that "sendUpdate" worked 0 times.
The bug has probably been surfaced by
ada6442
(#39),
which reordered the <script> tags, which made setUpdateListener()
run before anotherWebxdcUpdateListener was set.

This commit makes it not matter which order the scripts run in,
by introducing a "wrapper" around setUpdateListener.
We also had to move that piece of code in unload.js
because otherwise the listener would try to update the elements
before they have been inserted in the document.

The test would falsely report that "sendUpdate" worked 0 times.
The bug has probably been surfaced by
ada6442
(#39),
which reordered the `<script>` tags, which made `setUpdateListener()`
run before `anotherWebxdcUpdateListener` was set.

This commit makes it not matter which order the scripts run in,
by introducing a "wrapper" around `setUpdateListener`.
We also had to move that piece of code in `unload.js`
because otherwise the listener would try to update the elements
before they have been inserted in the document.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant