Skip to content

When is boot.js code called #7741

Answered by gfwilliams
kkayam asked this question in Bangle.js
Apr 26, 2025 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

It might be worth reading my response to your other post first as they're kind of related: https://github.com/orgs/espruino/discussions/7740

TLDR: boot scripts might not be called for every app load, but if you put something like a setInterval in a boot script, it will always be active (if the JS instance is reset then boot.js will be called right after).

boot.js scripts are called when the Bangle reloads the JS instance. For apps that don't support 'fast load' (most apps) when the app exits (or when you long-press to exit) Bangle.js tears the whole JS instance down and restarts, loads boot.js and then the app (eg your clock).

However for apps that are written in a certain way (supporting…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kkayam
Comment options

Answer selected by kkayam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants