Closed
Bug 136812
Opened 23 years ago
Closed 23 years ago
hasFeature not in DOMImplementation object
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
VERIFIED
INVALID
People
(Reporter: CharlesShuller, Assigned: jst)
Details
I'm not positive this is a bug, but there is enough of a discreprency that I
think it worth mentioning here.
In the W3C's DOM_Level_1 Specification, DOMImplementation is clearly represented
as a seperate object from document. This is the case in both the generic API
specification as well as the ECMA Script Bindings.
However, Mozilla apears to currently place hasFeature in the document object.
To better illustrate, a couple of examples.
How Mozilla currently references hasFeature:
document.implementation.hasFeature();
How I think it should be referenced, based on w3c specs:
DOMImplementation.hasFeature();
Comment 1•23 years ago
|
||
Scroll down a few more lines to where the Document interface is defined:
http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1B793EBA
the document object clearly defines:
implementation of type DOMImplementation, readonly
The DOMImplementation object that handles this document. A DOM application may
use objects from multiple implementations.
So we do this correctly.
Hoewever, an explicit reference to |DOMImplementation.hasFeature()| should at
the least be defined...
Assignee | ||
Comment 2•23 years ago
|
||
No, DOMImplementation is the "JS class" (aka constructor function), it's not an
instance of a DOM implementation, you can't call DOM methods on a JS class, you
need an instance. You can access the functions in that JS class through
class.prototype, i.e. DOMImplementation.prototype.hasFeature is a DOM method,
but to call it you need to pass in a calid |this| reference to the call.
Mozilla is right here, just because the implementation is reachable from the
document doesn't mean that the DOM implementation is tied to the document
internals in any way.
INVALID.
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
Component: DOM: Core → DOM: Core & HTML
QA Contact: stummala → general
You need to log in
before you can comment on or make changes to this bug.
Description
•