projects
/
pazpar2-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7c2c723
)
FIXED: pz2.js would break in IE because the DOMElement is missing hasAttributes metho...
author
Jakub Skoczen
<jakub@indexdata.dk>
Wed, 12 Mar 2008 11:36:57 +0000
(11:36 +0000)
committer
Jakub Skoczen
<jakub@indexdata.dk>
Wed, 12 Mar 2008 11:36:57 +0000
(11:36 +0000)
js/pz2.js
patch
|
blob
|
history
diff --git
a/js/pz2.js
b/js/pz2.js
index
21990d0
..
94d83ae
100644
(file)
--- a/
js/pz2.js
+++ b/
js/pz2.js
@@
-1,5
+1,5
@@
/*
/*
-** $Id: pz2.js,v 1.69 2008-02-14 12:20:24 jakub Exp $
+** $Id: pz2.js,v 1.70 2008-03-12 11:36:57 jakub Exp $
** pz2.js - pazpar2's javascript client library.
*/
** pz2.js - pazpar2's javascript client library.
*/
@@
-933,18
+933,16
@@
Element_parseChildNodes = function (node)
}
}
}
}
- if (node.hasAttributes()) {
- var attrs = node.attributes;
- for (var i = 0; i < attrs.length; i++) {
- var attrName = '@' + attrs[i].nodeName;
- var attrValue = attrs[i].nodeValue;
- parsed[attrName] = attrValue;
- }
+ var attrs = node.attributes;
+ for (var i = 0; i < attrs.length; i++) {
+ var attrName = '@' + attrs[i].nodeName;
+ var attrValue = attrs[i].nodeValue;
+ parsed[attrName] = attrValue;
}
// if no nested elements, get text content
if (node.hasChildNodes() && !hasChildElems) {
}
// if no nested elements, get text content
if (node.hasChildNodes() && !hasChildElems) {
- if (node.hasAttributes())
+ if (node.attributes.length)
parsed['textContent'] = node.firstChild.nodeValue;
else
parsed = node.firstChild.nodeValue;
parsed['textContent'] = node.firstChild.nodeValue;
else
parsed = node.firstChild.nodeValue;