| changeset 47 | c0b4a8b5a012 |
| 46:efd9c589177a | 47:c0b4a8b5a012 |
|---|---|
1 // TODO append(node)? |
|
2 // TODO append(function)? |
|
3 d3_selectionPrototype.append = function(name) { |
|
4 name = d3.ns.qualify(name); |
|
5 |
|
6 function append() { |
|
7 return this.appendChild(document.createElement(name)); |
|
8 } |
|
9 |
|
10 function appendNS() { |
|
11 return this.appendChild(document.createElementNS(name.space, name.local)); |
|
12 } |
|
13 |
|
14 return this.select(name.local ? appendNS : append); |
|
15 }; |