maximus
maximus

Reputation: 4302

JavaScript and DOM bindings

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:

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

Upvotes: 5

Views: 555

Answers (1)

danza
danza

Reputation: 12231

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

Upvotes: 2

Related Questions