Bug 87611 - [FileAPI] FileList.item should return null when the index is negative.
Summary: [FileAPI] FileList.item should return null when the index is negative.
Status: RESOLVED DUPLICATE of bug 77899
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2012-05-27 19:29 PDT by Li Yin
Modified: 2012-05-29 20:31 PDT (History)
4 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Li Yin 2012-05-27 19:29:03 PDT
From Spec: http://www.w3.org/TR/FileAPI/#dfn-item
If there is no indexth File object in the FileList, then this method must return null.

Currently, if index is largger than length, webkit returns null, it makes sense.
But it throws expection "INDEX_SIZE_ERR" when the index is negative.
Maybe it isn't friendly.

And both of Firefox and IE will return null, if index is negative or largger that length.
Although the spec have no obvious language to support negative index, I think if we support largger index, 
then we should support negative index as well.
Comment 1 Li Yin 2012-05-29 20:31:34 PDT

*** This bug has been marked as a duplicate of bug 77899 ***