[Dojo-interest] Cross-domain build and editor problems

James Burke jburke at dojotoolkit.org
Fri Dec 22 16:04:34 MST 2006


Just as a follow-up: the problem is RichText.js is doing a
document.write() after the document is loaded, destroying the
document.

So in general, avoid document.write() if you want things to work in
cross domain builds.

James

On 12/22/06, James Burke <jburke at dojotoolkit.org> wrote:
> The first issue is that not all the templates that it uses are
> interned. I have that fixed, but now there is a very weird scoping
> issue.
>
> Editor2Toolbar.js calls
> dojo.lang.declare("dojo.widget.HandlerManager", ...); to define
> dojo.widget.HandlerManager, and immediately after that call, it tries
> to create a new dojo.widget.HandlerManager object. However
> dojo.widget.HandlerManager is not defined after calling
> dojo.lang.declare.
>
> When investigating inside dojo.lang.declare, these line seems to be
> where things fall down:
>
> var created = dojo.parseObjPath(className, null, true);
> created.obj[created.prop] = ctor;
>
> The created.obj should be dojo.widget, but for some reason, it is not
> the right dojo.widget.
>
> Not sure what is going on, but that is the current state of my
> debugging. I've been working on this for most of the day.
>
> James
>
> On 12/22/06, Laurent Hasson <ldh at laurent-hasson.com> wrote:
> >
> > OK. Thanks for the info. Much appreciated. I'll hold on then for the
> > next XD build. I need the Editor more than i need the XD build.
> >
> > Just being curious though, what bug did you unearth? That may serve
> > as a lesson for other widget developers, including myself.
> >
> > LDH
> >
> >
> > At 12:24 PM 12/22/2006, James Burke wrote:
> > >On 12/21/06, Laurent Hasson <ldh at laurent-hasson.com> wrote:
> > >>
> > >>
> > >>  When i use the cross domain build (either the 0.3.1 hosted by AOL or the
> > >>0.4.1 hosted by Dojo) and invoke the Editor, i get an error:
> > >>
> > >>  Error: impl is not a constructor
> > >>  Source File:
> > >>http://o.aolcdn.com/iamalpha/.resource/jssdk/dojo-0.3.1/src/widget/Manager.xd.js
> > >>
> > >>  My code is simply as follows:
> > >>
> > >>
> > >>  < SCRIPT > var djConfig = { isDebug: false,
> > >>                            debugAtAllCosts: false,
> > >>                            disableFlashStorage: true ,
> > >>                            parseWidgets: false ,
> > >>                            useXDomain: true,
> > >>                            baseScriptUri: "/dojo031/",
> > >>                            xdWaitSeconds: 10} ;
> > >>  </ SCRIPT >
> > >>  < script type= "text/javascript" src =
> > >>"http://o.aolcdn.com/iamalpha/.resource/jssdk/dojo-0.3.1/dojo.js"
> > >> ></ script >
> > >>  < SCRIPT > dojo.setModulePrefix( "dojo", "
> > >>http://o.aolcdn.com/iamalpha/.resource/jssdk/dojo-0.3.1/src
> > >>"); </ SCRIPT >
> > >>
> > >>  <TEXTAREA name="htmltext" id="htmltext">Some html text here</TEXTAREA>
> > >>
> > >>  <SCRIPT>
> > >>           dojo.require( "dojo.widget.Editor" );
> > >>           dojo.addOnLoad(SetupEditor);
> > >>           function SetupEditor()
> > >>            {
> > >>              var editor = dojo.widget.fromScript( "Editor", {} , dojo.byId(
> > >>"htmltext" ));
> > >>            }
> > >>  <SCRIPT>
> > >>
> > >>
> > >>  Anyone quick spot what i am doing wrong? Or maybe there is a bug somewhere?
> > >>
> > >>
> > >>
> > >>  Thanks,
> > >>  LDH
> > >
> > >I discovered some issues with using Editor or Editor2 with a
> > >cross-domain build. I have fixed one issue, but still working through
> > >others, but all of that work is happening on the trunk. So
> > >unfortunately, I don't think you will be able to use Editor/Editor2 in
> > >0.3.1 or 0.4.1 with a cross domain build.
> > >
> > >James
> > >_______________________________________________
> > >Dojo FAQ: http://dojo.jot.com/FAQ
> > >Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> > >Dojo-interest at dojotoolkit.org
> > >http://dojotoolkit.org/mailman/listinfo/dojo-interest
> > >
> >
> >
> >
> >
> > _______________________________________________
> > Dojo FAQ: http://dojo.jot.com/FAQ
> > Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> > Dojo-interest at dojotoolkit.org
> > http://dojotoolkit.org/mailman/listinfo/dojo-interest
> >
>


More information about the Dojo-interest mailing list