Author: gotcha
Date: Tue Jul 24 16:22:59 2007
New Revision: 45302
Modified:
kukit/kukit.js/trunk/kukit/dom.js
Log:
when attrname is kssattr:xxx, IE chokes on certain nodes
Modified: kukit/kukit.js/trunk/kukit/dom.js
==============================================================================
--- kukit/kukit.js/trunk/kukit/dom.js (original)
+++ kukit/kukit.js/trunk/kukit/dom.js Tue Jul 24 16:22:59 2007
@@ -219,10 +219,19 @@
if (attrname.toLowerCase() == 'style') {
throw 'Style attribute is not allowed with getAttribute';
}
- // Try first, there is chance that it works
- // XXX this works but not for kukit:xxx args
- //var value = node[argname];
- var value = node.getAttribute(attrname);
+ ;;;if (typeof(attrname) != 'string') {
+ ;;; throw 'value error : attrname must be string';
+ ;;;}
+ // The code hereunder does not work for kssattr:xxx args
+ // var value = node[argname];
+
+ // try catch is needed in some cases on IE
+ try {
+ var value = node.getAttribute(attrname);
+ }
+ catch(e) {
+ var value = null;
+ }
if (! value) {
// Workarounds, in case we have not found above
if (attrname.toLowerCase() == 'class') {
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins