> > but if I had this need I'd know I can just rely on the mutable nature of > javascript and redefine the $() within my app to behave however I want.
Very true, and I have done just that. My goal was not only to help myself, but also others in the future who might not realize what is happening and why. I can certainly understand and respect why don't think it belongs, though. - Adam On 6/18/07, Ryan Gahl <[EMAIL PROTECTED]> wrote: > > my vote is #1 > > It is up to the devs to a) use the name and id attributes properly, and b) > wrap anything you want any way you want in some "custom wrappers" file that > you load in after prototype (or whatever library it is you are creating the > wrapper for). > > For instance, I have never had this problem, nor do I think I ever will > (if an element i want does not have an id, I can either add one or get the > reference via some other selector on a case by case basis -- basically the > name attribute has no value to me whatsoever)... but if I had this need I'd > know I can just rely on the mutable nature of javascript and redefine the > $() within my app to behave however I want. > > If this type of change _does_ make it into prototype, it would be an > addition of unnecessary code, IMHO. > > On 6/18/07, Adam McCrea < [EMAIL PROTECTED]> wrote: > > > > So sorry to beat this dead horse, but I just want to weigh in my > > thoughts on this before it gets shot down. I agree that $ should only be a > > light wrapper around getElementById, but unfortunately getElementById is > > broken across browsers. I'm surprised to hear that you think the fix is > > heavy. In my eyes it is a lightweight fix to save some major headaches for > > those who don't have control over the HTML source. > > > > My vote is for #2! > > > > - Adam > > > > On 6/18/07, Andrew Dupont <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > On Jun 18, 2:01 am, "Mislav Marohnić" <[EMAIL PROTECTED]> > > > wrote: > > > >There are only 3 possible options we're facing: > > > > > > > > 1. Don't change the $ function, leave everything as-is; > > > > 2. Fix the issue in $ by using $$('*[id=foo]'); > > > > 3. Don't fix the issue, throw error instead. > > > > > > My vote is for #1. The $ function is intended to be a light wrapper > > > around document.getElementById . The impulse is noble to want to > > > correct IE's incorrect behavior (and Opera's emulation thereof), but I > > > think it's just a little too heavy. > > > > > > Cheers, > > > Andrew > > > > > > > > > > > > > > > -- > Ryan Gahl > Manager, Senior Software Engineer > Nth Penguin, LLC > http://www.nthpenguin.com > -- > Architect > WebWidgetry.com / MashupStudio.com > Future Home of the World's First Complete Web Platform > -- > Inquire: 1-262-951-6727 > Blog: http://www.someElement.com > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---