Detecting Browser Canvas Support
Best feature of the HTML5 is Canvas,where we can develop good HTML animation ,games using canvas elements. Most of the developers will check the browser versions for detecting canvas support , i think that is bad practice . While we designing or developing HTML5 pages we should detect the feature. here is the small java script snippet.
function isCanvasSupported(){ var elem = document.createElement('canvas'); return !!(elem.getContext && elem.getContext('2d')); } |