Closed Bug 120681 Opened 23 years ago Closed 23 years ago

getAttribute() returns null if attribute does not have value

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 108480

People

(Reporter: stummala, Assigned: jst)

Details

(Keywords: regression, testcase)

Attachments

(1 file)

BuildID:    2001-01-15-03

getAttribute() returns null if attribute does not have value. 
It is supposed to return empty string. Testcase attached. This bug is a 
regression from 6.2.1

Reproducible: Always
Actual Results:  null
Expected Results:  empty string
Attached file testcase attached
adding keywords testcase and regression.
Keywords: regression, testcase
Duplicate of 108480.  We do this on purpose and by design.

*** This bug has been marked as a duplicate of 108480 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
verified
Status: RESOLVED → VERIFIED
I don't want to be rude or anything (I'm just interested). What's the purpose of
this design?
The purpose of the design is to let people call getAttribute() and check the
return value against null to see if the attribute was set or not. It saves you a
call if whether the attribute is there or not means different things than if the
attribute is there but has an empty value.
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.

Attachment

General

Created:
Updated:
Size: