Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indicate which elements need preserved state for DOM cloning #218

Open
AmeliaBR opened this issue Jul 26, 2016 · 0 comments
Open

Indicate which elements need preserved state for DOM cloning #218

AmeliaBR opened this issue Jul 26, 2016 · 0 comments

Comments

@AmeliaBR
Copy link
Contributor

As raised by @karip on #90 (Comment here).

The DOM 4 specs for node.cloneNode() method indicates:

Specifications may define cloning steps for all or some nodes. The algorithm is passed copy, node, document, and optionally a clone children flag, as indicated in the clone algorithm.

This allows current state of the node (such as text value in an input element) to also be cloned.

HTML requires that cloned <script> elements keep track of whether they are already started. A note in the DOM spec suggests

"SVG ought to do the same for its script elements, but does not call this out at the moment."

There may be other parts of SVG where special cloning rules are required, such as use elements and animation elements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants