`
- 浏览:
35357 次
- 性别:
- 来自:
成都
-
/*******************************************************************************
* Copyright (c) 2008, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
function BarProp(){};
BarProp.prototype = new Array();
/**
* Object Window()
* @super Global
* @constructor
* @since Common Usage, no standard
*/
function Window(){};
Window.prototype = new EventTarget();
Window.prototype.self = new Window();
Window.prototype.window = new Window();
Window.prototype.frames = new Array();
/**
* Property closed
* @type Boolean
* @memberOf Window
*/
Window.prototype.closed = new Boolean();
/**
* Property defaultStatus
* @type String
* @memberOf Window
*/
Window.prototype.defaultStatus = "";
/**
* Property document
* @type Document
* @memberOf Window
*/
Window.prototype.document= new HTMLDocument();
/**
* Property history
* @type History
* @memberOf Window
*/
Window.prototype.history= new History();
/**
* Property location
* @type Location
* @memberOf Window
*/
Window.prototype.location=new Location();
/**
* Property name
* @type String
* @memberOf Window
*/
Window.prototype.name = "";
/**
* Property navigator
* @type Navigator
* @memberOf Window
*/
Window.prototype.navigator = new Navigator();
/**
* Property opener
* @type Window
* @memberOf Window
*/
Window.prototype.opener = new Window();
/**
* Property outerWidth
* @type Number
* @memberOf Window
*/
Window.prototype.outerWidth = 0;
/**
* Property outerHeight
* @type Number
* @memberOf Window
*/
Window.prototype.outerHeight = 0;
/**
* Property pageXOffset
* @type Number
* @memberOf Window
*/
Window.prototype.pageXOffset = 0;
/**
* Property pageYOffset
* @type Number
* @memberOf Window
*/
Window.prototype.pageYOffset = 0;
/**
* Property parent
* @type Window
* @memberOf Window
*/
Window.prototype.parent = new Window();
/**
* Property screen
* @type Screen
* @memberOf Window
*/
Window.prototype.screen = new Screen();
/**
* Property status
* @type String
* @memberOf Window
*/
Window.prototype.status = "";
/**
* Property top
* @type Window
* @memberOf Window
*/
Window.prototype.top = new Window();
/*
* These properties may need to be moved into a browswer specific library.
*/
/**
* Property innerWidth
* @type Number
* @memberOf Window
*/
Window.prototype.innerWidth = 0;
/**
* Property innerHeight
* @type Number
* @memberOf Window
*/
Window.prototype.innerHeight = 0;
/**
* Property screenX
* @type Number
* @memberOf Window
*/
Window.prototype.screenX = 0;
/**
* Property screenY
* @type Number
* @memberOf Window
*/
Window.prototype.screenY = 0;
/**
* Property screenLeft
* @type Number
* @memberOf Window
*/
Window.prototype.screenLeft = 0;
/**
* Property screenTop
* @type Number
* @memberOf Window
*/
Window.prototype.screenTop = 0;
//Window.prototype.event = new Event();
Window.prototype.length = 0;
Window.prototype.scrollbars= new BarProp();
Window.prototype.scrollX=0;
Window.prototype.scrollY=0;
Window.prototype.content= new Window();
Window.prototype.menubar= new BarProp();
Window.prototype.toolbar= new BarProp();
Window.prototype.locationbar= new BarProp();
Window.prototype.personalbar= new BarProp();
Window.prototype.statusbar= new BarProp();
Window.prototype.directories= new BarProp();
Window.prototype.scrollMaxX=0;
Window.prototype.scrollMaxY=0;
Window.prototype.fullScreen="";
Window.prototype.frameElement="";
/* End properites */
/**
* function alert()
* @param {String} message
* @memberOf Window
*/
Window.prototype.alert = function(message){};
/**
* function blur()
* @memberOf Window
*/
Window.prototype.blur = function(){};
/**
* function clearInterval(intervalID)
* @param intervalID
* @memberOf Window
*/
Window.prototype.clearInterval = function(intervalID){};
/**
* function clearTimeout(intervalID)
* @param intervalID
* @memberOf Window
*/
Window.prototype.clearTimeout = function(intervalID){};
/**
* function close()
* @memberOf Window
*/
Window.prototype.close = function(){};
/**
* function confirm()
* @param {String} arg
* @memberOf Window
* @returns {Boolean}
*/
Window.prototype.confirm = function(arg){return false;};
/**
* function focus()
* @memberOf Window
*/
Window.prototype.focus = function(){};
/**
* function getComputedStyle(element, pseudoElt )
* @param {Element} element
* @param {String} pseudoElt
* @memberOf Window
* @returns {Object}
*/
Window.prototype.getComputedStyle = function(element,pseudoElt ){return new Object();};
/**
* function moveTo(x, y)
* @param {Number} x
* @param {Number} y
* @memberOf Window
*/
Window.prototype.moveTo = function(x,y){};
/**
* function moveBy(deltaX, deltaY)
* @param {Number} deltaX
* @param {Number} deltaY
* @memberOf Window
*/
Window.prototype.moveBy = function(deltaX,deltaY){};
/**
* function open(optionalArg1, optionalArg2, optionalArg3, optionalArg4)
* @param {String} url
* @param {String} windowName
* @param {String} windowFeatures
* @param {Boolean} optionalArg4
* @memberOf Window
* @returns {Window}
*/
Window.prototype.open = function(url, windowName, windowFeatures, optionalArg4){return new Window();};
/**
* function print()
* @memberOf Window
*/
Window.prototype.print = function(){};
/**
* function prompt(text, value)
* @param {String} text
* @param {String} value
* @memberOf Window
* @returns {String}
*/
Window.prototype.prompt = function(text, value){return "";};
/**
* function resizeTo(newOuterWidth,newOuterHeight)
* @param {Number} newOuterWidth
* @param {Number} newOuterHeighr
* @memberOf Window
*/
Window.prototype.resizeTo=function(newOuterWidth,newOuterHeight){};
/**
* function resizeBy(deltaX, deltaY)
* @param {Number} deltaX
* @param {Number} deltaY
* @memberOf Window
*/
Window.prototype.resizeBy=function(deltaX,deltaY){};
/**
* function scrollTo(x,y)
* @param {Number} x
* @param {Number} y
* @memberOf Window
*/
Window.prototype.scrollTo=function(x,y){};
/**
* function scrollBy(pixelX,pixelY)
* @param {Number} pixelX
* @param {Number} pixelY
* @memberOf Window
*/
Window.prototype.scrollBy=function(pixelX,pixelY){};
/**
* function setInterval(arg1, arg2)
* @param {Function} callback
* @param {Number} delay
* @memberOf Window
* @returns {Number}
*/
Window.prototype.setInterval=function(callback, delay){return 0;};
/**
* function setTimeout(callback, delay)
* @param {Function} callback
* @param {Number} delay
* @memberOf Window
* @returns {Number}
*/
Window.prototype.setTimeout=function(callback, delay){ return 0;};
/**
* function atob(encodedData)
* @param {String} encodedData
* @memberOf Window
* @returns {String}
*/
Window.prototype.atob=function(encodedData){return "";};
/**
* function btoa(arg)
* @param {String} stringToEncode
* @memberOf Window
* @returns {String}
*/
Window.prototype.btoa=function(stringToEncode){return "";};
/**
* function setResizable(resizable)
* @param {Boolean} resizable
* @memberOf Window
*/
Window.prototype.setResizable=function(resizable){};
Window.prototype.captureEvents=function(eventType){};
Window.prototype.releaseEvents=function(eventType){};
Window.prototype.routeEvent=function(eventType){};
Window.prototype.enableExternalCapture=function(){};
Window.prototype.disableExternalCapture=function(){};
Window.prototype.find=function(){};
Window.prototype.back=function(){};
Window.prototype.forward=function(){};
Window.prototype.home=function(){};
Window.prototype.stop=function(){};
/**
* @param {Number} pixelX
* @param {Number} pixelY
*/
Window.prototype.scroll=function(pixelX,pixelY){};
/* End functions */
/**
* Object History()
* @super Object
* @constructor
* @since Common Usage, no standard
*/
function History(){};
History.prototype=new Object();
History.prototype.history = new History();
/**
* Property length
* @type Number
* @memberOf History
*/
History.prototype.length = 0;
/**
* function back()
* @memberOf History
*/
History.prototype.back = function(){};
/**
* function forward()
* @memberOf History
*/
History.prototype.forward = function(){};
/**
* function back()
* @param arg
* @memberOf History
*/
History.prototype.go = function(arg){};
/**
* Object Location()
* @super Object
* @constructor
* @since Common Usage, no standard
*/
function Location(){};
Location.prototype = new Object();
Location.prototype.location = new Location();
/**
* Property hash
* @type String
* @memberOf Location
*/
Location.prototype.hash = "";
/**
* Property host
* @type String
* @memberOf Location
*/
Location.prototype.host = "";
/**
* Property hostname
* @type String
* @memberOf Location
*/
Location.prototype.hostname = "";
/**
* Property href
* @type String
* @memberOf Location
*/
Location.prototype.href = "";
/**
* Property pathname
* @type String
* @memberOf Location
*/
Location.prototype.pathname = "";
/**
* Property port
* @type String
* @memberOf Location
*/
Location.prototype.port = "";
/**
* Property protocol
* @type String
* @memberOf Location
*/
Location.prototype.protocol = "";
/**
* Property search
* @type String
* @memberOf Location
*/
Location.prototype.search = "";
/**
* function assign(arg)
* @param {String} arg
* @memberOf Location
*/
Location.prototype.assign = function(arg){};
/**
* function reload(optionalArg)
* @param {Boolean} optionalArg
* @memberOf Location
*/
Location.prototype.reload = function(optionalArg){};
/**
* function replace(arg)
* @param {String} arg
* @memberOf Location
*/
Location.prototype.replace = function(arg){};
/**
* Object Navigator()
* @super Object
* @constructor
* @since Common Usage, no standard
*/
function Navigator(){};
Navigator.prototype = new Object();
Navigator.prototype.navigator = new Navigator();
/**
* Property appCodeName
* @type String
* @memberOf Navigator
*/
Navigator.prototype.appCodeName = "";
/**
* Property appName
* @type String
* @memberOf Navigator
*/
Navigator.prototype.appName = "";
/**
* Property appVersion
* @type String
* @memberOf Navigator
*/
Navigator.prototype.appVersion = "";
/**
* Property cookieEnabled
* @type Boolean
* @memberOf Navigator
*/
Navigator.prototype.cookieEnabled = new Boolean();
/**
* Property mimeTypes
* @type Array
* @memberOf Navigator
*/
Navigator.prototype.mimeTypes = new Array();
/**
* Property platform
* @type String
* @memberOf Navigator
*/
Navigator.prototype.platform = "";
/**
* Property plugins
* @type Array
* @memberOf Navigator
*/
Navigator.prototype.plugins = new Array();
/**
* Property userAgent
* @type String
* @memberOf Navigator
*/
Navigator.prototype.userAgent = "";
/**
* function javaEnabled()
* @returns {Boolean}
* @memberOf Navigator
*/
Navigator.prototype.javaEnabled = function(){return false;};
/**
* Object Screen()
* @super Object
* @constructor
* @since Common Usage, no standard
*/
function Screen(){};
Screen.prototype = new Object();
Screen.prototype.screen = new Screen();
/**
* Property availHeight
* @type Number
* @memberOf Screen
*/
Navigator.prototype.availHeight = 0;
/**
* Property availWidth
* @type Number
* @memberOf Screen
*/
Navigator.prototype.availWidth = 0;
/**
* Property colorDepth
* @type Number
* @memberOf Screen
*/
Navigator.prototype.colorDepth = 0;
/**
* Property height
* @type Number
* @memberOf Screen
*/
Navigator.prototype.height = 0;
/**
* Property width
* @type Number
* @memberOf Screen
*/
Navigator.prototype.width = 0;
Event.prototype=new Object();
// PhaseType
Event.prototype.CAPTURING_PHASE = 1;
Event.prototype.AT_TARGET = 2;
Event.prototype.BUBBLING_PHASE = 3;
Event.prototype.type="";
Event.prototype.target=new EventTarget();
Event.prototype.currentTarget=new EventTarget();
Event.prototype.eventPhase=0;
Event.prototype.bubbles=false;
Event.prototype.cancelable=false;
Event.prototype.timeStamp=0;
Event.prototype.stopPropagation=function(){};
Event.prototype.preventDefault=function(){};
/**
* @param {String} eventTypeArg
* @param {Boolean} canBubbleArg
* @param {Boolean} cancelableArg
*/
Event.prototype.initEvent=function(eventTypeArg,
canBubbleArg,
cancelableArg){};
function EventListener(){};
EventListener.prototype=new Object();
/**
* @param {Event} event
* @memberOf EventListener
*/
EventListener.prototype.handleEvent=function(event){};
function EventTarget(){};
EventTarget.prototype=new Object();
/*
* These functions may need to be moved into a browser specific library.
*/
/**
* @memberOf Window
* @param event {Event}
* @throws {EventException}
*/
EventTarget.prototype.dispatchEvent=function(event){};
// https://developer.mozilla.org/en-US/docs/DOM/element.addEventListener
/**
* @memberOf Window
* @param {String} type
* @param {EventListener} listener
* @param {Boolean} useCapture
*/
EventTarget.prototype.addEventListener=function(type, listener, useCapture){};
// https://developer.mozilla.org/en-US/docs/DOM/element.removeEventListener
/**
* @memberOf Window
* @param {String} type
* @param {EventListener} listener
* @param {Boolean} useCapture
*/
EventTarget.prototype.removeEventListener=function(type, listener,
useCapture){};
分享到:
Global site tag (gtag.js) - Google Analytics
相关推荐
Vue.js则是一个轻量级的前端JavaScript框架,以其易学易用、组件化开发和高效的性能而闻名。下面我们将深入探讨这两个技术以及它们如何协同工作创建出这样的桌面应用。 **Electron基础知识** 1. **Electron架构**:...
在JavaScript(JS)中,通常情况下出于安全原因,我们无法直接调用本地电脑的源代码或文件系统。这是因为浏览器的同源策略限制了JavaScript的这种跨域访问能力,以防止恶意脚本对用户的电脑进行操作。然而,有一些...
它使用 Chromium 和 Node.js 等技术,允许开发者使用 HTML、CSS、JavaScript 等语言来开发桌面应用程序。 Electron 的出现极大地扩展了Web开发者的能力,使他们能够轻松地开发跨平台的桌面应用程序。 二、 环境设置...
"附件源码" 和 "文章源码" 标签表明这个压缩包包含的是一个可执行的代码示例,可能是用于教学或演示如何在 Electron 中实现打印功能。用户可以下载并运行这些源代码,以此了解和学习如何在自己的项目中集成打印功能...
2. **02 Electron 安装、使用快速启动demo搭建Electron项目** - 学习如何安装Electron全局和局部依赖。 - 使用基本模板快速启动一个简单的Electron应用。 - 了解并实践`package.json`文件的配置。 3. **03 手动...
Electron是构建跨平台桌面应用程序的一种流行框架,它利用了Chromium和Node.js的结合,使得开发者可以用HTML、CSS和JavaScript来开发桌面应用。版本v28.2.1的发布,意味着这个工具集又进行了一次更新,提升了性能,...
- `browserwindow.cpp/h`:封装 CEF 浏览器窗口,提供接口供 Qt 调用。 通过学习和理解 `QtCefSimpleDemo`,开发者可以快速掌握 Qt 与 CEF 的集成技术,进一步开发自己的混合式应用。 总之,Qt + CEF 集成提供了...
2. `main.js`:主进程的入口点,管理Electron应用的核心逻辑。 3. `index.html`:渲染进程的起点,定义了应用的用户界面。 4. `renderer.js`或类似文件:在渲染进程中运行的JavaScript代码,负责与UI交互。 5. `...
│ │ │ │ ├─2 │ │ │ │ ├─20 │ │ │ │ ├─21 │ │ │ │ ├─22 │ │ │ │ ├─23 │ │ │ │ ├─24 │ │ │ │ ├─25 │ │ │ │ ├─26 │ │ │ │ ├─27 │ │ │ │ ├...
- **Node.js**:Electron内置了Node.js,使得开发者可以在GUI应用程序中运行服务器端的JavaScript代码,实现异步I/O操作和模块化开发。 2. **项目结构** - **主进程(Main Process)**:运行Electron的主程序,...
- **模块**:Electron提供的一系列内置模块,如`app`, `autoUpdater`, `BrowserWindow`, `dialog`等。 #### 主进程和渲染进程模块 - **主进程内可用模块**:例如`powerMonitor`, `globalShortcut`, `ipcMain`, `...
首先,我们要理解Electron是一个基于Chromium和Node.js的桌面应用开发框架,它允许开发者使用Web技术(HTML、CSS、JavaScript)构建跨平台的桌面应用。 关键代码部分在`app.js`中,这里主要涉及Electron API的使用...
2. **IndexedDB**:这是一个更强大的数据库系统,用于存储大量结构化数据。清理IndexedDB需要执行一个事务来删除所有数据库。以下是一个示例: ```javascript const { indexedDB } = require('electron') indexed...
Electron是一个由GitHub开发的开源框架,用于构建跨平台的桌面应用程序,它结合了Chromium浏览器和Node.js,使开发者可以用HTML、CSS和JavaScript来开发桌面应用,同时享受到Node.js的后端功能。 hxElectron是Haxe...