Created
December 17, 2010 18:08
-
-
Save ajaswa/745404 to your computer and use it in GitHub Desktop.
moderizr extensions
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 characters
| Modernizr.dataUri = function() { | |
| var data = new Image(); | |
| data.onload = data.onerror = function(){ | |
| return this.width === 1 || this.height === 1; | |
| }; | |
| data.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="; | |
| }; |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Based on http://weston.ruter.net/2009/05/07/detecting-support-for-data-uris/