rubixibuc
rubixibuc

Reputation: 7417

JavaScript and dynamically creating objects

When you call document.createElement(...) on a particular document, does that newly created element only apply to that original document, or can it be inserted into other accessible windows/document trees?

Upvotes: 1

Views: 76

Answers (1)

icktoofay
icktoofay

Reputation: 129109

It can only be inserted in that document, but you can use adoptNode or importNode to make it accessible in a different document.

Upvotes: 3

Related Questions