MCPcopy Index your code
hub / github.com/pyscript/pyscript / clone

Method clone

core/src/stdlib/pyscript/web.py:668–676  ·  view source on GitHub ↗

Clone this element and its underlying DOM element. Optionally assign a new `id` to the clone.

(self, clone_id=None)

Source from the content-addressed store, hash-verified

666 raise TypeError(f"Cannot append {type(item).__name__} to element.")
667
668 def clone(self, clone_id=None):
669 """
670 Clone this element and its underlying DOM element.
671
672 Optionally assign a new `id` to the clone.
673 """
674 clone = Element.wrap_dom_element(self._dom_element.cloneNode(True))
675 clone.id = clone_id
676 return clone
677
678 def find(self, selector):
679 """

Callers

nothing calls this directly

Calls 1

wrap_dom_elementMethod · 0.80

Tested by

no test coverage detected