[whatwg] Canvas-Only Document Type

Floating a concept for a document mode which eschews CSS and the DOM
to enable a more jank-free Canvas surface.

Depending on how this allows for optimization, might be used well for
games, VR, wearables, and ultra-portable or high-performance apps.
Probably most beneficial to memory usage and first paint time.  Would
appreciate if some vendor engineers who might be reading could chime
in on this point.

Strawman:

Document only contains <!doctype canvas-[2d|3d]> and script elements.
Everything else is ignored.  "document" object is gone.

A Canvas drawing surface consumes the entire viewport.  It always has
an opaque backing store, same as specifying getContext('2d', { alpha:
false }).

UA provides:
* A host object representing surface's CanvasRenderingContext2D or
WebGLRenderingContext (depending on specified doctype).

* In lieu of DOM, an API for creating offscreen canvases (actually,
this abstraction should probably exist anyway).  This might live on
the Context host obj, which may open a beneficial performance
relationship between onscreen canvas and offscreen "children".

Received on Monday, 7 July 2014 20:42:50 UTC