javascript - Document.importNode VS Node.cloneNode (real example) -
document.importnode in specification
node.clonenode in specification
this 2 methods work equally. please give me real example in can see difference between methods.
alohci right: there's not of difference, since web compatibility forced browsers implicitly adoptnode()
before inserting node document.
before insert cloned node new document, there's difference: owner document of node returned clonenode(original)
same of original node, , new document if call newdocument.importnode(original)
. can see difference if use ownerdocument
or related properties (such baseuri).
but if call importnode on same document original node belongs to, there's no difference whatsoever.
Comments
Post a Comment