Skip to content

Commit

Permalink
experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
kangax authored and kangax committed May 15, 2008
1 parent e040f3e commit 1840a6d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ie_attributes_fix.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
('outerHTML' in document.documentElement) && Element.addMethods({
getAttributes: function(element) {
var match = element.outerHTML.match(/^<\w+\s*([^>]*)\>/);
if (!match || !match[1]) return [];
return match[1].split(/\s+/).map(function(pair) {
return pair.split('=')[0];
});
}
})

0 comments on commit 1840a6d

Please sign in to comment.