Admittedly, there are methods in Prototype (and any library) which are
not perfectly intuitive because they can serve multiple purposes for
the sake of condensing code.

i personally see the update() method as suitable. When there's an
argument, you're updating with the content in the argument. When
there's none, you're updating the element to empty content. There are
a lot of aliases in the Prototype library as it is - something i see
more often as a confusing eyesore than a help. If you really want to
propose the alias to the core, though, join the Prototype Core group
and toss it out there, see if it sticks.
-joe t.


On Apr 12, 9:01 am, Rüdiger Plantiko <ruediger.plant...@astrotexte.ch>
wrote:
> Hi,
>
> I didn't find a method for clearing the content of an HTML element
> *and* which from its name clearly indicates this action.
>
> I formerly used $("myContainer").update() for clearing the element's
> content, i.e. calling the update method with no arguments. But I
> prefer a readable alias like Element.clearContent() for this. (I first
> tried an alias "Element.clear()" but this wasn't a good idea, the
> function clear seems to be reserved for other things).
>
> I like to propose such an alias for the Prototype standard.
>
> Regards,
> Rüdiger

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to