code: func NewContext(canvas *js.Object, ca *ContextAttributes) (*Context, error) {
  	if js.Global.Get("WebGLRenderingContext") == js.Undefined {
  		return nil, errors.New("Your browser doesn't appear to support webgl.")
  	}
  
  	if ca == nil {
  		ca = DefaultAttributes()
  	}
  
  	attrs := map[string]bool{
  		"alpha":                 ca.Alpha,
  		"depth":                 ca.Depth,
  		"stencil":               ca.Stencil,
  		"antialias":             ca.Antialias,
  		"premultipliedAlpha":    ca.PremultipliedAlpha,
  		"preserveDrawingBuffer": ca.PreserveDrawingBuffer,
  	}
  	gl := canvas.Call("getContext", "webgl", attrs)
  	if gl == nil {
  		gl = canvas.Call("getContext", "experimental-webgl", attrs)
  		if gl == nil {
  			return nil, errors.New("Creating a webgl context has failed.")
  		}
  	}
  	ctx := new(Context)
  	ctx.Object = gl
  	return ctx, nil
  }
docs: // NewContext takes an HTML5 canvas object and optional context attributes.
  // If an error is returned it means you won't have access to WebGL
  // functionality.