Readonly
contextIf true, keep the original DOM element intact, otherwise remove it when cloned.
If true, empty the target element's contents before appending the cloned element.
A selector to determine the target location to clone the element.
Static
blessingsStatic
outletsStatic
targetsStatic
valuesResolve a valid target element, defaulting to the document.body or the shadow root's first DOM node if no target selector provided.
Returns a fresh copy of the DocumentFragment from the controlled element.
Static
should
Allows the controlled element's content to be copied and appended to another place in the DOM. Once copied, the original controlled element will be removed from the DOM unless
keep
is true. Ifreset
is true, the target element will be emptied before the controlled element is appended. If a target selector isn't provided, a default target ofdocument.body
or the Shadow Root's first DOM node will be used. Depending on location of the controlled element.Example