On this page
getCssCanvasContext method
- @SupportedBrowser(SupportedBrowser.CHROME)
- @SupportedBrowser(SupportedBrowser.SAFARI)
- @Experimental()
- @DomName('Document.getCSSCanvasContext')
Gets a CanvasRenderingContext which can be used as the CSS background of an element.
CSS:
background: -webkit-canvas(backgroundCanvas)
Generate the canvas:
var context = document.getCssCanvasContext('2d', 'backgroundCanvas',
100, 100);
context.fillStyle = 'red';
context.fillRect(0, 0, 100, 100);
See also:
Source
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental()
@DomName('Document.getCSSCanvasContext')
CanvasRenderingContext getCssCanvasContext(
String contextId, String name, int width, int height) {
throw new UnsupportedError("Not supported");
}
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-html/HtmlDocument/getCssCanvasContext.html