Bug 18852 - FileList says it's a Collection but that doesn't make sense
FileList says it's a Collection but that doesn't make sense
Status: RESOLVED FIXED
Product: WebAppsWG
Classification: Unclassified
Component: File API
unspecified
PC All
: P2 normal
: ---
Assigned To: Arun
public-webapps-bugzilla
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-12 07:42 UTC by Ian 'Hixie' Hickson
Modified: 2012-09-13 19:25 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ian 'Hixie' Hickson 2012-09-12 07:42:23 UTC
FileList says it's a Collection and links to DOM4 for the definition of Collection, but that doesn't make sense, because DOM4 says a Collection is a list of DOM nodes.
Comment 1 Arun 2012-09-12 17:13:29 UTC
What *should* FileList be described as in prose?  Should I NOT describe FileList as a Collection?  An earlier comment on the public-webapps listserv by AnneVK suggested that FileList should be described as a collection.
Comment 2 Arun 2012-09-12 18:31:53 UTC
I think this *does* actually make sense.

http://dev.w3.org/2006/webapi/FileAPI/#dfn-filelist

But I've Cc'd the editor of DOM4 to ask for clarification.
Comment 3 Anne 2012-09-12 18:41:51 UTC
It does not make sense.
Comment 4 Arun 2012-09-12 18:48:35 UTC
OK.  In that case:

1. FileList is NOT a Collection, and it is a bug to say it is.  That's fine; my reading of this thread by Anne resulted in FileList being defined as a Collection of File objects: 

http://lists.w3.org/Archives/Public/public-webapps/2011JulSep/0855.html 

What is a better way to refer to FileList?

2. FileList is a Collection, but the prose as written does not make sense.

Which is it?
Comment 5 Anne 2012-09-12 20:21:14 UTC
Well it's obviously a collection of some kind, just not in the narrow way defined by DOM.
Comment 6 Arun 2012-09-12 21:48:56 UTC
OK, since a collection is best defined in DOM4, can we have a more expansive concept?  File objects are not DOM nodes, but are objects referenced through the DOM.  Maybe include them as a permissible type to have a collection of?
Comment 7 Simon Pieters 2012-09-13 06:03:19 UTC
Why do you need to reference anything? Just say "This interface is a collection of File objects" or "This interface is a list of File objects" and be done with it. You don't want to hook into any implementation requirements here, this should just be a non-normative statement describing what the interface is used for.

Maybe better yet: drop the paragraph altogether and refer to the thing as just "FileList" or "FileList object".
Comment 8 Arun 2012-09-13 19:25:12 UTC
Done.