The Pebble localStorage API docs reference removeItem, but calling localStorage.removeItem('foo') fails constantly in the Pebble SDK SDK 4.9.169.
It throws
[00:05:34] xsPlatform.c:209> undefined
[00:05:34] xsPlatform.c:217> fxAbort unhandled exception:
[00:05:34] ault_handling.c:98> App fault! {33b1906f-37cc-4cb1-b6ac-5a9da3c94c8b} PC: 0x5 LR: ???
Program Counter (PC) : 0x5 b'??:0'
Link Register (LR) : ??? ???
Exception in thread PebbleConnection:
The implemented API is remove.
See the following example which works:
|
localStorage.remove("counter"); |
Seems like removeItem should be implemented if you want consistency with the familar Web Storage APIs
The Pebble localStorage API docs reference
removeItem, but callinglocalStorage.removeItem('foo')fails constantly in the Pebble SDK SDK 4.9.169.It throws
The implemented API is
remove.See the following example which works:
pebble-examples/hellolocalstorage/src/embeddedjs/main.js
Line 17 in 4473374
Seems like
removeItemshould be implemented if you want consistency with the familar Web Storage APIs