1.

What is the purpose of the adoptNode() method?(a) Removes node(b) Makes it ready for insertion(c) Removes node and Makes it ready for insertion(d) Changes the nodeThis question was posed to me in an online quiz.This interesting question is from JavaScript Benchmarking and Logging with perfLogger in portion Parsing, Benchmarking and Logging of JavaScript

Answer»

The CORRECT answer is (c) Removes node and Makes it READY for INSERTION

Best explanation: This METHOD removes the node from whatever document it is currently part of and changes its ownerDocument property to this document, making it ready for insertion into this document. The ADOPTNODE() method adopts a node from another document. The adopted node can be of all node types.



Discussion

No Comment Found

Related InterviewSolutions