Requires

Provides

Clone.js

Clones an element and inserts it back to parent again

License:
Public domain (http://unlicense.org).
Authors:
Yaroslaff Fedin
  1. 23
  2. 24
  3. 25
  4. 26
  5. 27
  6. 28
  7. 29
  8. 30
LSD.Action.Clone = LSD.Action.build({ enable: function(target) { if (target.localName) var widget = target.get('widget'), element = target, parent = widget; else var widget = target, element = widget.element, parent = widget.parentNode; var clone = this.document.layout.render(element, parent, 'clone'); (clone.toElement ? clone.toElement() : clone).inject(target, 'after'); } });