Closed jbmonroe closed 5 years ago
canvas : function () { return !!window.HTMLCanvasElement; },
It's tons faster since it doesn't require the overhead of creating an element.
This also works:
canvas : function () { return !!window.CanvasRenderingContext2D; },
See http://stackoverflow.com/questions/2745432/best-way-to-detect-that-html5-canvas-is-not-supported
Thanks for the suggestion, @jbmonroe. I'll check it out!
Ah! This method is already implemented! Closing.
It's tons faster since it doesn't require the overhead of creating an element.
This also works:
See http://stackoverflow.com/questions/2745432/best-way-to-detect-that-html5-canvas-is-not-supported