[Cosmo-dev] Dojo 0.9 (was Re: [Fwd: Re: HSV conversion code])

Nicola Piccinini pic at superfluo.org
Sat Aug 25 14:51:05 PDT 2007


> Without a major performance improvement,

yes, but I recommend not to trust in my feelings :O

> Seems like the layered builds
> could be beneficial to us, particularly if we can figure a way to do
> lazy loading of that code.

that should be a key factor in many different situations, I have to
examine this opportunity too.

> p.s. Nicola, when you say "'exotic' usage of the dom node used in widget
> creation," do you mean our use of that dummy DOM node so that the widget
> parser doesn't use document.body? Have they fixed that issue?

no, I've no knowledge of that.
I was referring to some usage in my code, an example:

in dojo 0.4.x:

        this.render = function (/*PG.Place*/o)
        {
               var e = dojo.doc().createElement('div');
               var w = dojo.widget.createWidget('pg:pref_place',
{place: o}, e, 'first')
               return e;
        }

and somewhere else, I could do

otherElement.appendChild(this.render(o))

because w.domNode == e

in dojo 0.9 instead I have to slightly refactor the function:

	this.render = function (/*PG.Place*/o)
	{
		var e = dojo.createElement('div');
		var w = new pg.widget.pref_place({place: o}, e);
		return w.domNode;
	}

because now w.domNode != e.
When one relies more upon the equality between widget domNode and node
used in widget constructor, the consequence of this difference could
be trickier.

Nicola


More information about the cosmo-dev mailing list