diff -r 000000000000 -r 40c8f766c9b8 src/cm/media/js/lib/yui/yui3.0.0/api/node-ie.js.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/cm/media/js/lib/yui/yui3.0.0/api/node-ie.js.html Mon Nov 23 15:14:29 2009 +0100 @@ -0,0 +1,179 @@ + + +
+ +if (!document.documentElement.hasAttribute) { // IE < 8
+ Y.Node.prototype.hasAttribute = function(attr) {
+ return Y.DOM.getAttribute(this._node, attr) !== '';
+ };
+}
+
+// IE throws error when setting input.type = 'hidden',
+// input.setAttribute('type', 'hidden') and input.attributes.type.value = 'hidden'
+Y.Node.ATTRS.type = {
+ setter: function(val) {
+ if (val === 'hidden') {
+ try {
+ this._node.type = 'hidden';
+ } catch(e) {
+ this.setStyle('display', 'none');
+ this._inputType = 'hidden';
+ }
+ } else {
+ try { // IE errors when changing the type from "hidden'
+ this._node.type = val;
+ } catch (e) {
+ Y.log('error setting type: ' + val, 'info', 'node');
+ }
+ }
+ return val;
+ },
+
+ getter: function() {
+ return this._inputType || this._node.type;
+ },
+
+ _bypassProxy: true // don't update DOM when using with Attribute
+};
+