[dojo-contributors] Small proposed change to dojo.io.script

Tom Trenka ttrenka at gmail.com
Sun Aug 5 10:54:38 EDT 2007


Thanks!  I'll let Dustin chime in here, since he's the one that really ran
across the issue (but yes, that's the issue IIRC).
trt

On 8/5/07, James Burke <jburke at dojotoolkit.org> wrote:
>
> I just changed the code to use dojo.doc instead of document. You can
> follow the code changes in this ticket:
>
> http://trac.dojotoolkit.org/ticket/3978
>
> Give that a shot with dojo.withDoc to see if that helps things (make
> sure the iframe has a dojo.io.script defined as being
> parent.dojo.io.script -- may be a bit hazardous, maybe define dojo =
> parent.dojo).
>
> I'm assuming you want to use an iframe because in browsers like
> Firefox, it executes dynamically added scripts in DOM order, which
> could be bad if you have a long-polling script, but also need to add
> other scripts after starting the long poll (or long running script).
> You won't get the JS evaluated for the other scripts until the first
> one completes.
>
> If that is not the problem you are having, it would be good to get more
> info.
>
> James
>
> On 8/4/07, Tom Trenka <ttrenka at gmail.com> wrote:
> > As long as it solves the problem we're running across, I'm good with it
> :)
> > I don't know withDoc at all, so I'll take your word for it.
> >
> > trt
> >
> >
> >  On 8/5/07, James Burke <jburke at dojotoolkit.org> wrote:
> > >
> > > I was considering something like this before, but I was thinking of
> > > leveraging dojo.withDoc, and having the dojo.io.script stuff reference
> > > dojo.doc for its work (so that it would work with dojo.withDoc). So,
> > > the code that calls dojo.io.script that wants to use a differnent
> > > document would use dojo.withDoc to change the document, and do the
> > > dojo.io.script call within the dojo.withDoc function.
> > >
> > > I like the idea of using withDoc since it was designed to allow
> > > changing the dojo.doc reference without having to change code that
> > > worked with the document. (see _base/_loader/hostenv_browser for
> > > dojo.withDoc definition). But I haven't worked all the way through to
> > > see if all that will work for dojo.io.script yet.
> > >
> > > James
> > >
> > > On 8/4/07, Tom Trenka <ttrenka at gmail.com> wrote:
> > > > Hey guys,
> > > >
> > > > Dustin and I are running into an issue with io.script where we're
> trying
> > to
> > > > deal with cross-frame/window references in using some RPC services,
> and
> > we
> > > > were wondering if we could propose a small change to dojo.io.script
> > before
> > > > 0.9 lands...basically it would allow you to optionally specify a
> > sourceNode
> > > > in the get method ioArg object that attach would use:
> > > >
> > > > (in dojo.io.script ):
> > > >
> > > > line 28:
> > > >
> > > > this.attach(ioArgs.id , ioArgs.url, ioArgs.sourceNode||null);
> > > >
> > > >
> > > > attach:function(/*String*/id, /*String*/url, /*Node?*/src){
> > > >      var d=src?src.ownerDocument:document;
> > > >      var element=d.createElement("script");
> > > > ...
> > > >
> > > >  It's a small simple change but it would allow more advanced users
> to
> > use
> > > > something like hidden iframes to deal with some cross-domain request
> > > > limitations (which is the situation we're up against).
> > > >
> > > >  Thoughts? Argument names are up for interpretation (definitely not
> > > > attached).  I ran into a similar problem about a month ago with
> > dojox.gfx,
> > > > and changing references to ownerDocument made a huge difference...
> > > >
> > > >  trt
> > > > _______________________________________________
> > > > dojo-contributors mailing list
> > > > dojo-contributors at dojotoolkit.org
> > > > http://dojotoolkit.org/mailman/listinfo/dojo-contributors
> > > >
> > > >
> > > ______________________________ _________________
> > > dojo-contributors mailing list
> > > dojo-contributors at dojotoolkit.org
> > > http://dojotoolkit.org/mailman/listinfo/dojo-contributors
> > >
> >
> >
> > _______________________________________________
> > dojo-contributors mailing list
> > dojo-contributors at dojotoolkit.org
> > http://dojotoolkit.org/mailman/listinfo/dojo-contributors
> >
> >
> _______________________________________________
> dojo-contributors mailing list
> dojo-contributors at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-contributors
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20070805/fe7317a0/attachment.htm 


More information about the dojo-contributors mailing list