Bugzilla – Bug 18852
FileList says it's a Collection but that doesn't make sense
Last modified: 2012-09-13 19:25:12 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.
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.
I think this *does* actually make sense.
But I've Cc'd the editor of DOM4 to ask for clarification.
It does not make sense.
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:
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?
Well it's obviously a collection of some kind, just not in the narrow way defined by DOM.
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?
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".