Home / Programming MCQs / Machine Learning MCQs / Question

M

Mr. Dubey • 51.43K Points
Coach

Q. What is the procedure to add methods to HTMLElement so that they will be inherited by the objects that represent the HTML tags in the current document?

(A) HTMLElement.prototype(…)
(B) HTMLElement.prototype
(C) HTML.addmethods()
(D) HTML.elements(add)
Explanation by: Mr. Dubey
It is implementation-dependent whether classes defined by the host environment (such as the web browser) can be augmented using Object.prototype. In many web browsers, for example, you can add methods to HTMLElement.prototype and those methods will be inherited by the objects that represent the HTML tags in the current document.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.