-
Notifications
You must be signed in to change notification settings - Fork 178
Pages Named "Clear" Cause Weird Behavior #438
Comments
will also freeze with other localStorage keywords |
Good catch. But @paul90, how did you even think to suspect this? I've not seen this behavior mentioned in any localStorage documentation. Many thanks to @michaelarthurcaulfield and his students. |
Not seen it mentioned anywhere either, but there are some hints. At least one question points to DOM Storage guide
I also noticed that trying to follow the link to 'clear' also empties localstorage, which is a bit of a give away. Although the error in the Firefox console points to JSON.parse. |
I'm reminded of little Bobby Tables. http://xkcd.com/327/ |
Of course Other than the recommendation quoted above, most of the JavaScript texts seem to freely mix the use of setItem/getItem, square brackets, and the dot notation with not a word of warning of the trap that is awaiting. |
To duplicate, create a page named "Clear". It will freeze in this position:
Not hard to work around, but mentioning in case strings are being evaluated in ways they shouldn't be.
DIscovered by student in my class writing page on the app Clear.
The text was updated successfully, but these errors were encountered: