Skip to content

Commit

Permalink
node[attName] = '' breaks FF4 but needed by IE to remove attributes. …
Browse files Browse the repository at this point in the history
…Added a try catch while waiting for something better or FF fix.
  • Loading branch information
pure committed Mar 25, 2011
1 parent e0d8827 commit 4ee78f3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion libs/pure.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ $p.core = function(sel, ctxt, plugins){
setstr = function(node, s) {
node.setAttribute(attPfx + attr, s);
if (attName in node && !isStyle) {
node[attName] = '';
try{node[attName] = '';}catch(e){} //FF4 gives an error sometimes
}
if (node.nodeType === 1) {
node.removeAttribute(attr);
Expand Down
40 changes: 20 additions & 20 deletions libs/pure_min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4ee78f3

Please sign in to comment.