Bug 87611
Summary: | [FileAPI] FileList.item should return null when the index is negative. | ||
---|---|---|---|
Product: | WebKit | Reporter: | Li Yin <li.yin> |
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | abarth, ap, haraken, jianli |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Li Yin
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.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Li Yin
*** This bug has been marked as a duplicate of bug 77899 ***