- @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"); }