5 ms·
Web browsers are HTML engines, so almost everything that runs in [the document frame of] a web browser is indeed HTML. You cannot under any normal circumstances
by exogen 10y ago
Web browsers are HTML engines, so almost everything that runs in [the document frame of] a web browser is indeed HTML. You cannot under any normal circumstances get a browser to execute JavaScript outside the context of a document – even in the Developer Console. You cannot create a Canvas (which is an element, as in HTML element) outside the context of a document.
That is why to create one you do:
document.createElement('canvas')
and there is no other way. `document`, by the way, being none other than:
> document.constructor
function HTMLDocument() { ... }
HTML is more than just the syntax. :)