Permalink
Browse files

experimental

  • Loading branch information...
kangax kangax
kangax authored and kangax committed May 15, 2008
1 parent e040f3e commit 1840a6d361cc3f76b4a945e11d8a8013959d53fa
Showing with 9 additions and 0 deletions.
  1. +9 −0 ie_attributes_fix.js
View
@@ -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.