Created
November 22, 2012 02:17
-
-
Save shabith/4129070 to your computer and use it in GitHub Desktop.
Revisions
-
shabith created this gist
Nov 22, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ /** * Assume we want to check the placeholder HTML5 feature support in input element. * Credit should go to Daniel Stocks, I found this on his placeholder plugin * (https://github.com/danielstocks/jQuery-Placeholder/blob/master/jquery.placeholder.js#L71) */ var NATIVE_SUPPORT = !!("placeholder" in document.createElement( "input" )); /** * Assume we want to check for HTML5 cavas support. * Found it on the stackoverflow. http://stackoverflow.com/a/2746983/502748 * */ function isCanvasSupported(){ var elem = document.createElement('canvas'); return !!(elem.getContext && elem.getContext('2d')); }