WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
21606
need consistency in naming of collection getters
https://bugs.webkit.org/show_bug.cgi?id=21606
Summary
need consistency in naming of collection getters
Ojan Vafai
Reported
2008-10-14 17:18:32 PDT
<weinig> after briefly talking this over with maciej, we actually think that using a name other than namedItem would be better <weinig> instead, I would recommend adding a nameGetter method to all the DOM classes that require special name lookup <weinig> for things like NodeList, it could be an inline function that just calls namedItem
Attachments
Add attachment
proposed patch, testcase, etc.
Ojan Vafai
Comment 1
2008-10-14 18:00:12 PDT
from webkit-dev: It would be great to make things as consistently as possible, though the key here is "as possible". Some of the IDL interfaces define an explicit namedItem() or getNamedItem() function, while others have only an implicit name getter. It is even possible in theory for an interface to have only a method named namedItem() but no implicit get-by-name behavior. What I would suggest is to give every class that supports get-by-name a method called "namedGetter", which is just an inline call to namedItem or getNamedItem or whatever, if there is an appropriate such method. Then the bindings generator could be changed so it can make use of that, and not require you to write namedItem() by hand in the JS bindings (by this I mean the JSC JS bindings). Regards, Maciej
Ojan Vafai
Comment 2
2008-11-26 17:19:10 PST
All the IDL cases where nameGetter were used that Chromium relied on have been changed to namedItem as they were exposed as such in Firefox. I don't have the bug IDs on hand, but in either case, I think this is no longer worth doing.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug