equal
deleted
inserted
replaced
454 |
454 |
455 var getElementsByClassName = function(parent, type, cls) { |
455 var getElementsByClassName = function(parent, type, cls) { |
456 if(!type) |
456 if(!type) |
457 type = '*'; |
457 type = '*'; |
458 ret = new Array(); |
458 ret = new Array(); |
|
459 if ( !parent ) |
|
460 return ret; |
459 el = parent.getElementsByTagName(type); |
461 el = parent.getElementsByTagName(type); |
460 for ( var i = 0; i < el.length; i++ ) |
462 for ( var i = 0; i < el.length; i++ ) |
461 { |
463 { |
462 if ( typeof(el[i]) != 'object') |
464 if ( typeof(el[i]) != 'object') |
463 continue; // toJSONString() compatibility |
465 continue; // toJSONString() compatibility |