Tomorrow I'll look more at what I can do with this for an actual app.
I also helped Finn troubleshoot his app, since Firefox OS places a bunch of restrictions on what you can and can't do within your code. They are trying to completely separate the html from javascript, and so they don't allow you to have an element with an onclick property. Instead, you have to define an event listener in Javascript. This makes sense, because if they allowed this, someone could make an html page that had something like <body onload="//malicious code">.
Good observation about the problem of using JavaScript, which was never designed to do the kind of things it is now being asked to do, in a way that is secure and sane.
ReplyDeleteKevin pointed me to another short video by Gary Bernhardt (who did the Birth and Death of JavaScript talk at Pycon last year) titled WAT. I couldn't stop laughing as I watched it, and all of the humor is provided by some of the crazy behaviors built-in to JavaScript:
https://www.destroyallsoftware.com/talks/wat
I'll bring this in on Monday and show it to the class.