The crux of my request is to make functions available to each element. insertBefore() and appendChild() are already available to each element; it is only natural to add insertAfter() and prependChild() methods.
As far as where they are defined, I don't care; If Insertion.Top and Insertion.After are enhanced to also accept nodes, then I would propose: Element.addMethods({ prependChild: Insertion.Top, insertAfter: Insertion.After }); Now if it is important to make _ALL_ four Insertion methods available to each element, we would probably be forced to come up with four additional names (like Tobie's below) because some browsers wouldn't like redefining methods for appendChild and insertBefore. Then we might have: Element.addMethods({ prependChild: Insertion.Top, insertAfter: Insertion.After, insertionTop: Insertion.Top, insertionBottom: Insertion.Bottom, insertionBefore: Insertion.Before, insertionAfter: Insertion.After }); However, I think it is cleanest and fastest to add prependChild() and insertAfter() methods that don't pass through Insertion. --Ken Snyder Tobie Langel wrote: > Definitely aggreed. > > Could we go for somethign a bit more consistent in the naming though ? > > append = Insertion.Top > prepend = Insertion.Bottom > addBefore = Insertion.Before > addAfter = Insertion.After --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---