thyttan a49add78aa E_showMenu_F18/Q3: rm internal l as cb func arg
Remove internal menu object `l` as argument to callback function.

This removes a potential for memory leaks and should otherwise have no
impact. As no app on the main BangleApps repo seems to use the option.
See https://github.com/espruino/Espruino/issues/2567.

closes #2567
2024-10-11 00:10:28 +02:00
..
2023-06-13 09:22:21 +01:00
2023-06-13 09:22:21 +01:00
2023-06-13 09:22:21 +01:00
2023-11-08 13:35:10 +00:00
2023-06-13 09:22:21 +01:00
2023-06-13 09:22:21 +01:00
2023-06-13 09:22:21 +01:00
2023-06-13 09:22:21 +01:00
2023-06-13 09:22:21 +01:00
2023-06-13 09:22:21 +01:00
2023-06-13 09:22:21 +01:00
2023-06-13 09:22:21 +01:00
2023-06-13 09:22:21 +01:00
2023-06-13 09:22:21 +01:00
2023-06-13 09:22:21 +01:00
2018-01-28 23:10:35 +01:00
2018-08-13 09:24:37 +01:00

Built-in JS modules

Simply stick the JS modules you want in this directory, then modify the boards/BOARDNAME.py file so it includes a line that sets JSMODULESOURCES:

info = {
 ....
 'build' : {
   ....
   'makefile' : [
     ....
     'JSMODULESOURCES+=libs/js/YOUR_MODULE.min.js',
   ]
 }
};

or add them as prefix to make

JSMODULESOURCES=libs/js/YOUR_MODULE.min.js make

Then when you rebuild, require("YOUR_MODULE") will magically pull in your module.

Notes

  • Until referenced, modules use NO RAM
  • Once referenced, the JS code in a module will be executed (from Flash).
  • Every function declared in the module's root scope will take up some RAM
  • However the code inside that function will be kept in Flash memory, so won't take up RAM.