Implementation vs Interface
The discussion so far has focused on DOM Level 2 core functionality. The DOM working group defines a base set of functionality that all implementations must fulfill. The DOM working group has also defined interfaces that model peripheral functionality that implementations can elect to implement or not implement as they see fit. Rather than use the well-known component development techniques[11] for interface discovery, the DOM working group instead relies on a hard-coded method (DOMImplementation.hasFeature) to determine whether a given implementation supports some feature. DOMImplementation.hasFeature allows you to query for specific versions of DOM feature support. The following Java code tests if the DOM implementation ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access