Skip to content

Commit cfabbff

Browse files
committed
Add E.internal as a way to access the 'hidden root' containing Espruino internal variables that previously needed global["\xff"]
1 parent 08502f8 commit cfabbff

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

ChangeLog

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
: Add `E.internal` as a way to access the 'hidden root' containing Espruino internal variables that previously needed `global["\xff"]`
2+
13
2v27 : nRF5x: Ensure Bluetooth notifications work correctly when two separate connections use the same handle for their characteristics
24
nRF5x: Remove handlers from our handlers array when a device is disconnected
35
Bangle.js: Fix wrapString when wrapping a non-UTF8 string containing UTF8 characters (fix #2633)

src/jswrap_espruino.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,21 @@ E.on('touch',t=>{
134134
```
135135
*/
136136

137+
138+
/*JSON{
139+
"type" : "staticproperty",
140+
"class" : "E",
141+
"name" : "internal",
142+
"generate_full" : "jsvLockAgain(execInfo.hiddenRoot)",
143+
"return" : ["JsVar","The 'hidden root'"]
144+
}
145+
[2v28+] A reference to the "hidden root" that contains
146+
internal Espruino JavaScript variables such as lists
147+
of timers and watches.
148+
149+
On earlier firmwares this was accessible via `global["\xff"]`
150+
*/
151+
137152
/*JSON{
138153
"type" : "staticmethod",
139154
"class" : "E",

0 commit comments

Comments
 (0)