> Jeff, Ryan: could you give me a use case for the scoped prefixes ? My
> intial thought is to think they're overkill / too specific... but I
> don't mind being prooved wrong.

I don't exactly have a use case. I can see the overkill tendency.  
It's not the end of the world to create your own if this is a  
_really_ important feature.

> I'm also concerned about naming the method adequately. Sam suggested
> Element#denominate which looks nicer than (generate|assign)Id but
> which I fear could be confused with setting the "name" attribute. The
> only other option I came up with is Element#identify. Thoughts on this
> issue ?

I lean towards making the method name explicit: `assignId`. To my  
mind, `denominate` doesn't actually tell me what the method does. And  
`getId`, as Ken suggested, is not quite right, because it says  
nothing of the true purpose of the method: assign a new id if the  
node doesn't have one. If I liked to type more, I'd vote for  
`assignUniqueId`.

> Also, I'm wondering whether the method should return the element - for
> chaining purposes and to follow the general pattern of the other DOM
> methods - or the generated id itself, which IMHO would proove more
> useful here. Again, what are your thoughts ?

Definitely return the id. You already have the node. And if you want  
the ID, which is presumably why you assigned one in the first place,  
it's inefficient to request it again later.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to