Closed Bug 684458 Opened 13 years ago Closed 13 years ago

Node.contains should throw when its argument is null

Categories

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

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: Ms2ger, Unassigned)

References

Details

The spec has

  boolean contains(Node other);

This means we're supposed to throw a TypeError is null is passed. Any exception is fine for now, I guess.
I'd say this is a spec bug.

isEqualNode is somewhat similar method and it doesn't throw, but returns false when null is passed.
And the spec bug is now fixed, and this is now invalid.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.