[Seaside] "Element.extend is not a function" anybody?

Sebastian Sastre ssastre at seaswork.com
Mon Jun 11 20:46:52 UTC 2007

> -----Mensaje original-----
> De: seaside-bounces at lists.squeakfoundation.org 
> [mailto:seaside-bounces at lists.squeakfoundation.org] En nombre 
> de Lukas Renggli
> Enviado el: Lunes, 11 de Junio de 2007 15:50
> Para: Seaside - general discussion
> Asunto: Re: [Seaside] "Element.extend is not a function" anybody?
> >         So.. Questions: 1) which are the "best practices" for 
> > guaranteeing order?
> Use updateRoot: of your root component to add the Javascript 
> code manually. Or make sure that you add your libraries in 
> the proper order and that their #selectorsToInclude are 
> properly ordered.
> 2) how can I check or manipulate that load order?
> FireBug. The files are evaluated from top to bottom.
> > PD: just to contextualize: what I'm trying to do is the 
> initialization 
> > of a js singleton that should be instantiated after everything is 
> > loaded. Besides the initialization of this singleton (called 
> > ElementManager) there should be "someone" (I'm unsuccesfully trying 
> > with a BODY onload) that add someElements to it. Those someElements 
> > are objects that wrapps the prototype DOM extended elements. One 
> > wrapper for each div that I've also made to wrap seaside 
> components of some class.
> onLoad should be fine. Maybe it is more save to do it as the 
> last line of your JavaScript code, if the code doesn't depend 
> on the DOM to be complete.
> Lukas
Yes ! Thank you so much Lukas! I'm using onLoad event in the root component
as you said and that made the trick. The rest was fine (library order and
#selectorsToInclude). I didn't need to use #updateRoot: by now.

I'll continue this with some js refactor I've found convenient now.

Thanks again Lukas,


More information about the Seaside mailing list