List of usage examples for com.google.gwt.modernizr.client.utils CanvasElement create
public static CanvasElement create()
From source file:com.google.gwt.modernizr.client.tests.Canvas.java
License:MIT License
@Override protected boolean runTest() { CanvasElement canvas = CanvasElement.create(); return canvas.getContext("2d") != null; }
From source file:com.google.gwt.modernizr.client.tests.CanvasText.java
License:MIT License
@Override protected boolean runTest() { return Modernizr.canvas() && CanvasElement.create().isTextSupported(); }
From source file:com.google.gwt.modernizr.client.tests.Webgl.java
License:MIT License
@Override protected boolean runTest() { CanvasElement canvas = CanvasElement.create(); try {/* ww w .ja va2 s .c o m*/ if (canvas.getContext("webgl") != null) { return true; } } catch (Exception e) { } try { if (canvas.getContext("experimental-webgl") != null) { return true; } } catch (Exception e) { } return false; }