Closed Bug 403856 Opened 17 years ago Closed 17 years ago

nsIDOMFileList naming not consistent with other DOM or JS objects

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: BijuMailList, Unassigned)

References

Details

Minor, two issue naming issue.
nsIDOMFileList naming not consistent with other DOM or JS objects 
(see bug 371432 for nsIDOMFileList)

Issue 1. 
========
[object XXXList] vs [object XXXCollection] 


Till now we named Collection but now we are changing that naming standard for nsIDOMFileList

ie, toString() gives
documenrt.plugins = [object HTMLCollection]
documenrt.embeds = [object HTMLCollection]
documenrt.anchors = [object HTMLCollection]
documenrt.forms = [object HTMLCollection]
documenrt.applets = [object HTMLCollection]
documenrt.images = [object HTMLCollection]
documenrt.links = [object HTMLCollection]
selection_element.options = [object HTMLOptionsCollection]

current:
input_type_file.fileList = [object FileList]


Expected by convention: (something like)
input_type_file.fileList = [object FileCollection]



Issue 2. 
========
fileList vs files

Always we used the plural form of the item name to represent Collection/List

Example

arguments
documenrt.links
selection_element.options
documenrt.plugins
documenrt.embeds
documenrt.anchors
documenrt.forms
documenrt.applets
documenrt.images


But for nsIDOMFileList we appended word "List" to the item name

Expected by convention: just "files"
I think this is INVALID. Those other things can be accessed by name, i.e. document.links.foo. This is just a simple list.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → INVALID
but why fileList instead of just files
Actually, issue 2 might be right. Dave, is there a spec for this? Or can we simply change it ourselves?
Blocks: 405741
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.