This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 22617 - NamedFlowCollection item and namedItem should return null
Summary: NamedFlowCollection item and namedItem should return null
Status: RESOLVED FIXED
Alias: None
Product: CSS
Classification: Unclassified
Component: Regions (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Alan Stearns
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-09 15:45 UTC by Erik Arvidsson
Modified: 2013-07-11 19:02 UTC (History)
2 users (show)

See Also:


Attachments

Description Erik Arvidsson 2013-07-09 15:45:47 UTC
For consistency with all other dom collections.

Maybe you were confused by the following asserts which passes for all dom collections?

assert(collection.item(42) === null);
assert(collection.namedItem('foobar') === null);
assert(collection[42] === undefined);
assert(collection['foobar'] === undefined);
Comment 1 Alan Stearns 2013-07-09 19:51:52 UTC
I previously changed from null to undefined based on Boris Zbarsky's recommendation:

http://lists.w3.org/Archives/Public/www-style/2012Aug/0871.html
Comment 2 Alan Stearns 2013-07-11 19:02:49 UTC
Undid the undefined change. Now the collection methods return null on a miss.

https://dvcs.w3.org/hg/csswg/rev/5c1cbb9d3749