This method allows web developers to read back the ContextAttributes consumed by the platform and compare them to what were requested. Shipping this method will allow lining up with WebGL's homonymous method. [1]


Editor's draft

Status in Chromium


In developer trial (Behind a flag) (tracking bug) in:

  • Chrome for desktop release 73
  • Chrome for Android release 73
  • Android WebView release 73

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

  • Positive
  • No signal
  • No signal
  • No signals



Users provide ContextAttributes on context creation, e.g. let ctx = canvas.getContext("2d", {alpha : false}); this method lets the user read back the actual parameters as the platform consumed them: let alphaValue = ctx.getContextAttributes().alpha; (note that specs in flight add more parameters). Issue trackers for implementation in Firefox and Webkit:

Last updated on 2020-11-19