I'm afraid I don't have time to read through all of this right now - but in short:
You don't need to mess around with canvasses, you just need to create a special 'arraybuffer' graphics - see here
I'd really advise against writing all your own graphics library (unless it's done just to make the PC look like Espruino). Espruino graphics is quite fast because it's done in native C code internally, but as soon as you start writing to pixels by hand in Espruino you'll find that everything runs too slowly.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I'm afraid I don't have time to read through all of this right now - but in short: