|
Last change
on this file since a762898 was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago |
|
Prototype 1.1
|
-
Property mode
set to
100644
|
|
File size:
453 bytes
|
| Line | |
|---|
| 1 | function selection_cloneShallow() {
|
|---|
| 2 | var clone = this.cloneNode(false), parent = this.parentNode;
|
|---|
| 3 | return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
|
|---|
| 4 | }
|
|---|
| 5 |
|
|---|
| 6 | function selection_cloneDeep() {
|
|---|
| 7 | var clone = this.cloneNode(true), parent = this.parentNode;
|
|---|
| 8 | return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
|
|---|
| 9 | }
|
|---|
| 10 |
|
|---|
| 11 | export default function(deep) {
|
|---|
| 12 | return this.select(deep ? selection_cloneDeep : selection_cloneShallow);
|
|---|
| 13 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.