Skip to content

Commit

Permalink
allow getting srcset in Safari using the data-pfsrcset attribute.
Browse files Browse the repository at this point in the history
  • Loading branch information
aFarkas committed Nov 24, 2014
1 parent 08b46bc commit 3d75d4b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/picturefill.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,8 @@
pf.dodgeSrcset = function( img ) {
if ( img.srcset ) {
img[ pf.ns ].srcset = img.srcset;
img.removeAttribute( "srcset" );
img.srcset = "";
img.setAttribute( "data-pfsrcset", img[ pf.ns ].srcset );
}
};

Expand Down

0 comments on commit 3d75d4b

Please sign in to comment.