Closed
Bug 188413
Opened 22 years ago
Closed 22 years ago
missing version in hasFeature produces uncaught exception
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: bugzilla, Assigned: jst)
Details
Attachments
(1 file)
70 bytes,
text/html
|
Details |
<script>
alert(document.implementation.hasFeature("XML"));
</script>
produces:
Error: uncaught exception: [Exception... "Not enough arguments
[nsIDOMDOMImplementation.hasFeature]" nsresult: "0x80570001
(NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: file:///C:/Temp/dom.html
:: <TOP_LEVEL> :: line 2" data: no]
http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-core.html#ID-102161490
says that:
"This is the version number of the feature to test. In Level 1, this is the
string "1.0". If the version is not specified, supporting any version of the
feature causes the method to return true."
So version is optional!
20030108
Reporter | ||
Comment 1•22 years ago
|
||
Comment 2•22 years ago
|
||
It's "optional" as in you can pass in "null" for it. It's not optional as in
you can not pass it at all.
Reporter | ||
Comment 3•22 years ago
|
||
IE can do this:
alert(document.implementation.hasFeature("XML"));
otherwise -> invalid. you decide.
Assignee | ||
Comment 4•22 years ago
|
||
The DOM spec says nothing about the *argument* being optional, passing a valid
*value* is optional though, so null, or empty string is ok.
INVALID.
Status: NEW → RESOLVED
Closed: 22 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
•