flymis/WebRoot/dojojs/src/html/iframe.js
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
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.html.iframe");
dojo.require("dojo.html.util");
// thanks burstlib!
dojo.html.iframeContentWindow = function(/* HTMLIFrameElement */iframe_el) {
// summary
// returns the window reference of the passed iframe
var win = dojo.html.getDocumentWindow(dojo.html.iframeContentDocument(iframe_el)) ||
// Moz. TODO: is this available when defaultView isn't?
dojo.html.iframeContentDocument(iframe_el).__parent__ ||
(iframe_el.name && document.frames[iframe_el.name]) || null;
return win; // Window
}
dojo.html.iframeContentDocument = function(/* HTMLIFrameElement */iframe_el){
// summary
// returns a reference to the document object inside iframe_el
var doc = iframe_el.contentDocument // W3
|| ((iframe_el.contentWindow)&&(iframe_el.contentWindow.document)) // IE
|| ((iframe_el.name)&&(document.frames[iframe_el.name])&&(document.frames[iframe_el.name].document))
|| null;
return doc; // HTMLDocument
}
dojo.html.BackgroundIframe = function(/* HTMLElement */node) {
// summary
// For IE z-index schenanigans
// Two possible uses:
// 1. new dojo.html.BackgroundIframe(node)
// Makes a background iframe as a child of node, that fills area (and position) of node
// 2. new dojo.html.BackgroundIframe()
// Attaches frame to dojo.body(). User must call size() to set size.
if(dojo.render.html.ie55 || dojo.render.html.ie60) {
var html="<iframe src='javascript:false'"
+ "' style='position: absolute; left: 0px; top: 0px; width: 100%; height: 100%;"
+ "z-index: -1; filter:Alpha(Opacity=\"0\");' "
+ ">";
this.iframe = dojo.doc().createElement(html);
this.iframe.tabIndex = -1; // Magic to prevent iframe from getting focus on tab keypress - as style didnt work.
if(node){
node.appendChild(this.iframe);
this.domNode=node;
}else{
dojo.body().appendChild(this.iframe);
this.iframe.style.display="none";
}
}
}
dojo.lang.extend(dojo.html.BackgroundIframe, {
iframe: null,
后面还有 57 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。