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

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

mapreduce - Resource manager does not transit to active state from standby -

serialization - Convert Any type in scala to Array[Byte] and back -