/* Copyright (c) 2004-2006, The Dojo Foundation All Rights Reserved. Licensed under the Academic Free License version 2.1 or above OR the modified BSD license. For more information on Dojo licensing, see: http://dojotoolkit.org/community/licensing.shtml */ dojo.provide("dojo.io.IframeIO"); dojo.require("dojo.io.BrowserIO"); dojo.require("dojo.uri.*"); // FIXME: is it possible to use the Google htmlfile hack to prevent the // background click with this transport? dojo.io.createIFrame = function(/*String*/fname, /*String*/onloadstr, /*String?*/uri){ //summary: Creates a hidden iframe in the page. Used mostly for data transports. //fname: String // The name of the iframe. Used for the name attribute on the iframe. //onloadstr: String // A string of Javascript that will be executed when the content in the iframe loads. //uri: String // The value of the src attribute on the iframe element. If a value is not // given, then iframe_history.html will be used. if(window[fname]){ return window[fname]; } if(window.frames[fname]){ return window.frames[fname]; } var r = dojo.render.html; var cframe = null; var turi = uri||dojo.uri.dojoUri("iframe_history.html?noInit=true"); var ifrstr = ((r.ie)&&(dojo.render.os.win)) ? '