File size: 453 Bytes
bc20498 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
function selection_cloneShallow() {
var clone = this.cloneNode(false), parent = this.parentNode;
return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
}
function selection_cloneDeep() {
var clone = this.cloneNode(true), parent = this.parentNode;
return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
}
export default function(deep) {
return this.select(deep ? selection_cloneDeep : selection_cloneShallow);
}
|