~caneypuggies/reformedchurcheslocator/couchapp-backbone

« back to all changes in this revision

Viewing changes to _attachments/js/vendor/modernizr/feature-detects/url-data-uri.js

  • Committer: Tim Black
  • Date: 2013-09-16 22:50:16 UTC
  • Revision ID: tim@alwaysreformed.com-20130916225016-zk8jiba25z33ew7h
Versioned Bower vendor directory

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// data uri test.
 
2
// https://github.com/Modernizr/Modernizr/issues/14
 
3
 
 
4
// This test is asynchronous. Watch out.
 
5
 
 
6
 
 
7
// in IE7 in HTTPS this can cause a Mixed Content security popup. 
 
8
//  github.com/Modernizr/Modernizr/issues/362
 
9
// To avoid that you can create a new iframe and inject this.. perhaps..
 
10
 
 
11
 
 
12
(function(){
 
13
 
 
14
  var datauri = new Image();
 
15
 
 
16
 
 
17
  datauri.onerror = function() {
 
18
      Modernizr.addTest('datauri', function () { return false; });
 
19
  };  
 
20
  datauri.onload = function() {
 
21
      Modernizr.addTest('datauri', function () { return (datauri.width == 1 && datauri.height == 1); });
 
22
  };
 
23
 
 
24
  datauri.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";
 
25
 
 
26
})();