dojox/io/scriptFrame.js

  • Provides:

    • dojox.io.scriptFrame
  • Requires:

    • dojo.io.script in common in project dojo
    • dojo.io.iframe in common in project dojo
  • dojox.io.scriptFrame

    • type
      Object
    • summary
  • dojo.io.script._canAttach

    • type
      Function
    • parameters:
      • ioArgs: (typeof Object)
    • source: [view]
        var fId = ioArgs.args.frameDoc;


        if(fId && dojo.isString(fId)){
         var frame = dojo.byId(fId);
         var waiters = scriptFrame._getWaiters(fId);
         if(!frame){
          //Need to create frame, but the frame document, which *must* be
          //on the same domain as the page (set djConfig.dojoBlankHtmlUrl
          //if using xdomain loading). Loading of the frame document is asynchronous,
          //so we need to do callback stuff.
          waiters.push(ioArgs);
          dojo.io.iframe.create(fId, dojox._scopeName + ".io.scriptFrame._loaded('" + fId + "');");
         }else{
          //Frame loading could still be happening. Only call attach if the frame has loaded.
          if(scriptFrame._loadedIds[fId]){
           ioArgs.frameDoc = dojo.io.iframe.doc(frame);
           this.attach(ioArgs.id, ioArgs.url, ioArgs.frameDoc);
          }else{
           waiters.push(ioArgs);
          }
         }
         return false;
        }else{
         return oldCanAttach.apply(this, arguments);
        }
    • summary
      provides an override of dojo.io.script._canAttach to check for
      the existence of a the args.frameDoc property. If it is there, and it is a string,
      not a document, then create the iframe with an ID of frameDoc, and use that for the calls.
      If frameDoc is a document, then dojox.io.scriptFrame should not get involved.
    • chains:
      • oldCanAttach: (call)
  • dojox.io.scriptFrame._waiters

    • type
      Object
    • summary
  • dojox.io.scriptFrame._loadedIds

    • type
      Object
    • summary
  • dojox.io.scriptFrame._getWaiters

    • type
      Function
    • parameters:
      • frameId: (typeof String)
    • source: [view]
         return this._waiters[frameId] || (this._waiters[frameId] = []);
    • summary
  • dojox.io.scriptFrame._fixAttachUrl

    • type
      Function
    • parameters:
      • url: (typeof String)
    • source: [view]
         //summary: fixes the URL so that
    • summary
      fixes the URL so that
  • dojox.io.scriptFrame._loaded

    • type
      Function
    • parameters:
      • frameId: (typeof String)
    • source: [view]
         var waiters = this._getWaiters(frameId);
         this._loadedIds[frameId] = true;
         this._waiters[frameId] = null;


         for(var i = 0; i < waiters.length; i++){
          var ioArgs = waiters[i];
          ioArgs.frameDoc = dojo.io.iframe.doc(dojo.byId(frameId));
          ioScript.attach(ioArgs.id, ioArgs.url, ioArgs.frameDoc);
         }
    • summary
      callback used when waiting for a frame to load (related to the usage of
      the frameId argument to dojo.io.script.get().
  • dojox.io

    • type
      Object
    • summary
  • dojox

    • type
      Object
    • summary