You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
694 B
26 lines
694 B
// data uri test.
|
|
// https://github.com/Modernizr/Modernizr/issues/14
|
|
|
|
// This test is asynchronous. Watch out.
|
|
|
|
|
|
// in IE7 in HTTPS this can cause a Mixed Content security popup.
|
|
// github.com/Modernizr/Modernizr/issues/362
|
|
// To avoid that you can create a new iframe and inject this.. perhaps..
|
|
|
|
|
|
(function(){
|
|
|
|
var datauri = new Image();
|
|
|
|
|
|
datauri.onerror = function() {
|
|
Modernizr.addTest('datauri', function () { return false; });
|
|
};
|
|
datauri.onload = function() {
|
|
Modernizr.addTest('datauri', function () { return (datauri.width == 1 && datauri.height == 1); });
|
|
};
|
|
|
|
datauri.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";
|
|
|
|
})();
|
|
|