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

Commit

Permalink
Remove checking for width and height attributes, to reduce overheads …
Browse files Browse the repository at this point in the history
…in IE
  • Loading branch information
davebeesleyarchived committed Nov 12, 2013
1 parent b86dc4f commit 799347d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions picturefill.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,8 @@

picImg.src = matchedEl.getAttribute( "data-src" );
matchedEl.appendChild( picImg );
if(picImg.getAttribute("width")){
picImg.removeAttribute("width");
}
if(picImg.getAttribute("height")){
picImg.removeAttribute("height");
}
picImg.removeAttribute("width");
picImg.removeAttribute("height");
}
else if( picImg ){
picImg.parentNode.removeChild( picImg );
Expand Down

0 comments on commit 799347d

Please sign in to comment.