Permalink
Browse files

Merge pull request #2143 from ibolmo/fix-2113-webkit-button-type

Fixes #2113.
  • Loading branch information...
2 parents 2c3f288 + 0ecfdbe commit 25afa16f05ddf472b8598cc5323f040a8f72688d @cpojer cpojer committed Nov 29, 2011
Showing with 10 additions and 1 deletion.
  1. +9 −0 Source/Element/Element.js
  2. +1 −1 Specs
@@ -576,6 +576,15 @@ propertyGetters['class'] = function(node){
return ('className' in node) ? node.className || null : node.getAttribute('class');
};
+/* <webkit> */
+var el = document.createElement('button');
+// IE sets type as readonly and throws
+try { el.type = 'button'; } catch(e){}
+if (el.type != 'button') propertySetters.type = function(node, value){
+ node.setAttribute('type', value);
+};
+/* </webkit> */
+
/* getProperty, setProperty */
Element.implement({
2 Specs

0 comments on commit 25afa16

Please sign in to comment.