demo/dist/assets/js/picturefill.js
function runPicturefill() {
    picturefill();
    var intervalId = setInterval( function(){
      // When the document has finished loading, stop checking for new images
      // https://github.com/ded/domready/blob/master/ready.js#L15
      w.picturefill();
      if ( /^loaded|^i|^c/.test( doc.readyState ) ) {
        clearInterval( intervalId );
        return;
      }
    }, 250 );
    if( w.addEventListener ){
      var resizeThrottle;
      w.addEventListener( "resize", function() {
        w.clearTimeout( resizeThrottle );
        resizeThrottle = w.setTimeout( function(){
          picturefill({ reevaluate: true });
        }, 60 );
      }, false );
    }
  }
function runPicturefill() {
    picturefill();
    var intervalId = setInterval( function(){
      // When the document has finished loading, stop checking for new images
      // https://github.com/ded/domready/blob/master/ready.js#L15
      w.picturefill();
      if ( /^loaded|^i|^c/.test( doc.readyState ) ) {
        clearInterval( intervalId );
        return;
      }
    }, 250 );
    if( w.addEventListener ){
      var resizeThrottle;
      w.addEventListener( "resize", function() {
        w.clearTimeout( resizeThrottle );
        resizeThrottle = w.setTimeout( function(){
          picturefill({ reevaluate: true });
        }, 60 );
      }, false );
    }
  }
function runPicturefill ( ) { picturefill ( ) ; var intervalId = setInterval ( function ( ) { // When the document has finished loading, stop checking for new images // https://github.com/ded/domready/blob/master/ready.js#L15 w . picturefill ( ) ; if ( / ^loaded|^i|^c / . test ( doc . readyState ) ) { clearInterval ( intervalId ) ; return ; } } , 250 ) ; if ( w . addEventListener ) { var resizeThrottle ; w . addEventListener ( "resize" , function ( ) { w . clearTimeout ( resizeThrottle ) ; resizeThrottle = w . setTimeout ( function ( ) { picturefill ( { reevaluate : true } ) ; } , 60 ) ; } , false ) ; } }
Sets up picture polyfill by polling the document and running
the polyfill every 250ms until the document is ready.
Also attaches picturefill on resize
Sets up picture polyfill by polling the document and running the polyfill every 250ms until the document is ready . Also attaches picturefill on resize