[whatwg] canvas context "alpha" attribute

Rik Cabanier cabanier at gmail.com
Wed Mar 12 02:04:47 PDT 2014


About a year ago, Google and mozilla proposed the "alpha" attribute as an
option when you create the canvas context. The wiki explains the feature
very well. [1]
Since then, Google has implemented and shipped this [2][3]. There is a
proposal to implement [4] and a patch [5] for firefox.

An author can "feature test" by setting alpha to false and reading a pixel
in the context. If the pixel comes back with an alpha of 0, it means that
it is not supported.

Could this be added to the HTML specification? [6]

1: http://wiki.whatwg.org/wiki/CanvasOpaque
2: http://crbug.com/234297
3:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/4KMwyiaOxHg
4: https://groups.google.com/forum/#!topic/mozilla.dev.platform/5i8H-xKGtEg
5: https://bugzilla.mozilla.org/show_bug.cgi?id=982480
6:
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-canvas-getcontext



More information about the whatwg mailing list