- A HTMLElement.prototype(
- B HTMLElement.prototype
- C HTML.addmethods()
- D HTML.elements(add)
- Share this MCQ
Answer:
B
Share this MCQ
Whether or not classes defined by the host environment (such as web browsers) can be augmented using Object.prototype
depends on the implementation. In some cases, it may be possible to add methods to the prototype of a class and have those methods be inherited by objects that represent instances of the class.
For example, in many web browsers, it is possible to add methods to HTMLElement.prototype
and have those methods be inherited by the objects that represent HTML tags in the current document.
Share this MCQ