Skip to content

[html] Specifying alpha attribute in canvas.getContext() does not seem to work #19361

Open
@DartBot

Description

This issue was originally filed by Ilya.V...@gmail.com


Found during port of js layout test
tests/co19/src/LayoutTests/fast/canvas/alpha_t01.dart

It's unclear what kind of attributes map is supported.

Neither false nor 'false' seem to work:

reduced test:

main() {
  var c = new CanvasElement();
  var ctx1 = c.getContext("2d", { 'alpha': false } );
  shouldBeFalse(ctx1.getContextAttributes().alpha);
  //var ctx2 = c.getContext("2d", { 'alpha': 'false' } );
  //shouldBeFalse(ctx2.getContextAttributes().alpha);
}

Metadata

Assignees

No one assigned

    Labels

    area-webUse area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop.library-htmltype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)web-librariesIssues impacting dart:html, etc., libraries

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions