OSDN Git Service
(root)
/
sie
/
sie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9982239
)
Array.concatよりもfor文で展開した方が速かったため、getElementsByTagNameNSメソッドで、concatメソッドの利用をやめる
author
dhrname
<dhrname@users.sourceforge.jp>
Mon, 29 Apr 2013 14:32:11 +0000
(23:32 +0900)
committer
dhrname
<dhrname@users.sourceforge.jp>
Mon, 29 Apr 2013 14:32:11 +0000
(23:32 +0900)
org/w3c/core.js
patch
|
blob
|
history
diff --git
a/org/w3c/core.js
b/org/w3c/core.js
index
a5ac236
..
10bcc94
100644
(file)
--- a/
org/w3c/core.js
+++ b/
org/w3c/core.js
@@
-688,13
+688,15
@@
Element.prototype = Object._create(Node); //ノードのプロ
if (f.nodeType === /*Node.ELEMENT_NODE*/ 1) {
\r
if((ta || (f.localName === localName)) && (na || (f.namespaceURI === namespaceURI))) {
\r
s[n] = f;
\r
- n++
\r
+ n++
;
\r
}
\r
if (f.firstChild) { //子要素があれば
\r
d = f.getElementsByTagNameNS(namespaceURI, localName);
\r
if (d) {
\r
- s = s.concat(d);
\r
- n = s.length;
\r
+ for (var i=0,dli=d.length;i<dli;++i) {
\r
+ s[n] = d[i];
\r
+ n++;
\r
+ }
\r
}
\r
}
\r
}
\r