Search completed in 0.95 seconds.
7 results for "adoptNode":
Document.adoptNode() - Web APIs
WebAPIDocumentadoptNode
document.adoptnode() transfers a node from another document into the method's document.
... syntax const importednode = document.adoptnode(externalnode); parameters externalnode the node from another document to be adopted.
... example const iframe = document.queryselector('iframe'); const iframeimages = iframe.contentdocument.queryselectorall('img'); const newparent = document.getelementbyid('images'); iframeimages.foreach(function(imgel) { newparent.appendchild(document.adoptnode(imgel)); }); notes before they can be inserted into the current document, nodes from external documents should either be: cloned using document.importnode(); or adopted using document.adoptnode().
... specifications specification status comment domthe definition of 'document.adoptnode' in that specification.
Document.importNode() - Web APIs
WebAPIDocumentimportNode
unlike document.adoptnode(), the original node is not removed from its original document.
...e = document.queryselector("iframe"); const oldnode = iframe.contentwindow.document.getelementbyid("mynode"); const newnode = document.importnode(oldnode, true); document.getelementbyid("container").appendchild(newnode); notes before they can be inserted into the current document, nodes from external documents should either be: cloned using document.importnode(); or adopted using document.adoptnode().
Index - Web APIs
WebAPIIndex
863 document.adoptnode() api, dom, dom reference, method, needsexample, needsspectable, needsupdate, reference document.adoptnode() transfers a node from another document into the method's document.
...note that such data will not be preserved when imported via node.importnode, as with node.clonenode() and node.renamenode() operations (though node.adoptnode does preserve the information), and equality tests in node.isequalnode() do not consider user data in making the assessment.
Connecting to Remote Content - Archive of obsolete content
ArchiveAdd-onsOverlay ExtensionsXUL SchoolConnecting to Remote Content
request.onload = function(aevent) { let responsexml = aevent.target.responsexml; let xulnode; // transform the xml document to a xul document xuldocument = xsltprocessor.transformtodocument(responsexml); // append the xul node to a xul element xulnode = document.adoptnode(xuldocument.firstchild); document.getelementbyid("foo").appendchild(xulnode); }; we effectively transformed the xml file into xul and integrated it into the ui.
Document - Web APIs
WebAPIDocument
document.adoptnode() adopt node from an external document.
Node.setUserData() - Web APIs
WebAPINodesetUserData
note that such data will not be preserved when imported via node.importnode, as with node.clonenode() and node.renamenode() operations (though node.adoptnode does preserve the information), and equality tests in node.isequalnode() do not consider user data in making the assessment.
UserDataHandler - Web APIs
WebAPIUserDataHandler
constants constant value operation node_cloned 1 node.clonenode() node_imported 2 document.importnode() node_deleted unimplemented (see bug 550400) 3 node_renamed unimplemented 4 node.renamenode() node_adopted 5 document.adoptnode() (node_renamed is currently not supported since node.renamenode() is not supported.) specification dom level 3 core: userdatahandler ...