[Webkit-unassigned] [Bug 70117] Only expose window.WebGLRenderingContext to Web content when WebGL is enabled

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Sep 9 17:53:57 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=70117





--- Comment #5 from Dean Jackson <dino at apple.com>  2012-09-09 17:54:15 PST ---
The reason I don't like making that particular attribute undefined, is that we'd probably have to do it for all the WebGL attributes on window:


        attribute [Conditional=WEBGL] WebGLActiveInfoConstructor WebGLActiveInfo;
        attribute [Conditional=WEBGL] WebGLBufferConstructor WebGLBuffer;
        attribute [Conditional=WEBGL] WebGLFramebufferConstructor WebGLFramebuffer;
        attribute [Conditional=WEBGL] WebGLProgramConstructor WebGLProgram;
        attribute [Conditional=WEBGL] WebGLRenderbufferConstructor WebGLRenderbuffer;
        attribute [Conditional=WEBGL] WebGLRenderingContextConstructor WebGLRenderingContext;
        attribute [Conditional=WEBGL] WebGLShaderConstructor WebGLShader;
        attribute [Conditional=WEBGL] WebGLShaderPrecisionFormatConstructor WebGLShaderPrecisionFormat;
        attribute [Conditional=WEBGL] WebGLTextureConstructor WebGLTexture;
        attribute [Conditional=WEBGL] WebGLUniformLocationConstructor WebGLUniformLocation;

I think a better idea is if a canvas element could return a list of context names it supports. e.g.

canvas.getSupportedContexts() -> ["2d", "webkit-3d", "experimental-webgl"];

(probably prefixed with webkit for now)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list