Closed Bug 642367 Opened 9 years ago Closed 9 years ago

Update documentation for JS_DeleteElement2

Categories

(Core :: JavaScript Engine, defect)

x86
Windows 7
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: sdwilsh, Unassigned)

References

()

Details

(I was asked to file bugs on poor documentation.  If there is a better component for this, please let me know)

The documentation currently says that the last parameter receives the stored value at the index passed in but has (???) at the end.  This seems contrary to what JS_DeleteProperty2 does, so I suspect it might also be wrong.

The return value also differs from JS_DeleteProperty2 in the documentation.  As far as I can tell, however, JS_DeleteElement2 just calls JS_DeletePropertyById2, which is the same code path as JS_DeleteProperty2.  I don't want to update the documentation because I'm not 100% sure though.
(In reply to comment #0)
> (I was asked to file bugs on poor documentation.  If there is a better
> component for this, please let me know)
> 
> The documentation currently says that the last parameter receives the stored
> value at the index passed in but has (???) at the end.  This seems contrary to
> what JS_DeleteProperty2 does, so I suspect it might also be wrong.
> 
> The return value also differs from JS_DeleteProperty2 in the documentation.  As
> far as I can tell, however, JS_DeleteElement2 just calls
> JS_DeletePropertyById2, which is the same code path as JS_DeleteProperty2.

I concur. I copied the text from JS_DeleteProperty2 rval to JS_DeleteElement2.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.