Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Commit

Permalink
only run webp test, if browser does not support picture
Browse files Browse the repository at this point in the history
  • Loading branch information
aFarkas committed Jun 18, 2015
1 parent 9ef486e commit 568f100
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion dist/picturefill.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@

// test svg support
types[ "image/svg+xml" ] = document.implementation.hasFeature( "http://wwwindow.w3.org/TR/SVG11/feature#Image", "1.1" );
types[ "image/webp" ] = detectTypeSupport("image/webp", "data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA==" );

/**
* updates the internal vW property with the current viewport width in px
Expand Down Expand Up @@ -1372,6 +1371,8 @@

on( window, "resize", onResize );
on( document, "readystatechange", run );

types[ "image/webp" ] = detectTypeSupport("image/webp", "data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA==" );
})();
}

Expand Down
Loading

0 comments on commit 568f100

Please sign in to comment.