Okay, the relevant/revelatory code can be seen at:
http://mxr.mozilla.org/mozilla-central/source/content/html/c...
Here's the string being constructed in the getContext method, after some checking:
nsCString ctxString("@mozilla.org/content/canvas-rendering-context;1?id="); ctxString.Append(ctxId);
I'd assume it's some kind of resource naming convention or somesuch ... but, anyway, searching for strings "@mozilla.org/" and canvas and gl ...
You get nsLayoutModule.cpp
... { "Canvas WebGL Rendering Context", NS_CANVASRENDERINGCONTEXTWEBGL_CID, "@mozilla.org/content/canvas-rendering-context;1?id=moz-webgl", CreateCanvasRenderingContextWebGL }, ...
The first example I tried fails:
gl.clearDepth is not a function.
But, anyway, it's a start.
Okay, the relevant/revelatory code can be seen at:
http://mxr.mozilla.org/mozilla-central/source/content/html/c...
Here's the string being constructed in the getContext method, after some checking:
Where ctxId is, say, "2d".I'd assume it's some kind of resource naming convention or somesuch ... but, anyway, searching for strings "@mozilla.org/" and canvas and gl ...
You get nsLayoutModule.cpp
bingo! "moz-webgl" WORKS.The first example I tried fails:
:(But, anyway, it's a start.