nunaliit2-js: Work on generic canvas.

Issue #266