Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaScript and DOM bindings

Tags:

javascript

dom

I am reading the DOM standard where it states:

DOMImplementationRegistry is a global variable which has the following functions: getDOMImplementation(features) ...etc

I am trying to understand but can't find information about:

  • who provides the implementation of this DOMImplementationRegistry object?
  • how does JavaScript get the desired DOM implementation? Is it implemented in JavaScript (for using in JavaScript)?
  • how can I access this variable (DOMImplementationRegistry)?

Could you explain it to me or provide a useful link please?

like image 510
maximus Avatar asked Nov 04 '22 01:11

maximus


1 Answers

As the specifications says, it is a global variable. As far as i can see, it is not implemented in Chrome nor in Firefox, otherwise you would be able to use it from the Chrome or Firefox console as, for example, the DOMImplementation object (you can find this object as a global variable in the browser's consoles).

This page https://developer.mozilla.org/en-US/docs/DOM/DOMImplementationRegistry states that this feature is not implemented in firefox. I didn't find similar statements pertaining Chrome.

  • your question: who provides the implementation of this DOMImplementationRegistry object?

who is implementing the DOM interface, for example browsers like Chrome or Firefox. You can use their implementation running their web console.

  • your question: how does JavaScript get the desired DOM implementation?

it is written in the specification you linked. a javascript statement should call DOMImplementationRegistry.getDOMImplementation(features) if the global variable DOMImplementationRegistry would be existing

  • your question: how can I access this variable (DOMImplementationRegistry)?

if implemented, it should be a global variable

  • your question: Is it implemented in JavaScript (for using in JavaScript)?

yes, the interface defined in the specification you included is implemented in javascript in order to be used by javascript code

like image 81
danza Avatar answered Nov 09 '22 09:11

danza