Closed
Bug 378479
Opened 18 years ago
Closed 18 years ago
Select.add() method throws NS_ERROR_XPC_NOT_ENOUGH_ARGS when only one argument is given
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
VERIFIED
DUPLICATE
of bug 182279
People
(Reporter: omahaprogrammer, Unassigned)
Details
Attachments
(1 file)
629 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
I am creating a Select object with a dynamic option list. Using JavaScript, when I call add() on the object and only give it one argument, I get a NS_ERROR_XPC_NOT_ENOUGH_ARGS exception. I have to explicitly pass "undefined" as a second argument in order for the script to work in Firefox and IE. Since this is in JavaScript, any missing arguments should automatically be set to "undefined."
Reproducible: Always
Steps to Reproduce:
1. Call document.formObject.selectObject.add(new Option('A new option', 'A new option', false, false))
Actual Results:
A NS_ERROR_XPC_NOT_ENOUGH_ARGS exception is thrown, since add() assumes two arguments. I have to explictly set "undefined" to the second argument
Expected Results:
The JavaScript interpreter should be implicitly passing "undefined" to the second argument.
Since this is currently on an internal business system, I cannot supply a URL. I will attach a test case.
Reporter | ||
Comment 1•18 years ago
|
||
Updated•18 years ago
|
Assignee: nobody → general
Component: General → DOM: HTML
Product: Firefox → Core
QA Contact: general → ian
Updated•18 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
Updated•15 years ago
|
Assignee: general → nobody
Status: RESOLVED → VERIFIED
OS: Windows XP → All
Hardware: x86 → All
You need to log in
before you can comment on or make changes to this bug.
Description
•