W3C
school
文档首页
HTML
CSS
Javascript
Python
jQuery
NodeJS
PHP
Java
MySQL
Express
More »
开关
Electron 官方文档
<webview>
<webview allowpopups>
<webview autosize>
<webview blinkfeatures>
<webview disableblinkfeatures>
<webview disableguestresize>
<webview disablewebsecurity>
<webview guestinstance>
<webview httpreferrer>
<webview nodeintegration>
<webview partition>
<webview plugins>
<webview preload>
<webview src>
<webview useragent>
<webview webpreferences>
<webview>
<webview>.canGoBack()
<webview>.canGoForward()
<webview>.canGoToOffset()
<webview>.capturePage()
<webview>.clearHistory()
<webview>.closeDevTools()
<webview>.copy()
<webview>.cut()
<webview>.delete()
<webview>.executeJavaScript()
<webview>.findInPage()
<webview>.getTitle()
<webview>.getURL()
<webview>.getUserAgent()
<webview>.getWebContents()
<webview>.goBack()
<webview>.goForward()
<webview>.goToIndex()
<webview>.goToOffset()
<webview>.insertCSS()
<webview>.insertText()
<webview>.inspectElement()
<webview>.inspectServiceWorker()
<webview>.isAudioMuted()
<webview>.isCrashed()
<webview>.isDevToolsFocused()
<webview>.isDevToolsOpened()
<webview>.isLoading()
<webview>.isWaitingForResponse()
<webview>.loadURL()
<webview>.openDevTools()
<webview>.paste()
<webview>.pasteAndMatchStyle()
<webview>.print()
<webview>.printToPDF()
<webview>.redo()
<webview>.reload()
<webview>.reloadIgnoringCache()
<webview>.replace()
<webview>.replaceMisspelling()
<webview>.selectAll()
<webview>.send()
<webview>.sendInputEvent()
<webview>.setAudioMuted()
<webview>.setUserAgent()
<webview>.setZoomFactor()
<webview>.setZoomLevel()
<webview>.showDefinitionForSelection()
<webview>.stop()
<webview>.stopFindInPage()
<webview>.undo()
<webview>.unselect()
Guides
About Electron
Accessibility
Application Distribution
Application Packaging
Debugging the Main Process
Debugging the Main Process in node-inspector
Debugging the Main Process in VSCode
Desktop Environment Integration
DevTools Extension
Electron FAQ
Electron Versioning
Glossary
Keyboard Shortcuts
Keyboard Shortcuts
Mac App Store Submission Guide
Multithreading
Notifications (Windows, Linux, macOS)
Offscreen Rendering
Online/Offline Event Detection
Planned Breaking API Changes
Quick Start
REPL
Security, Native Capabilities, and Your Responsibility
Supported Platforms
Testing on Headless CI Systems (Travis CI, Jenkins)
Using Native Node Modules
Using Pepper Flash Plugin
Using Selenium and WebDriver
Using Widevine CDM Plugin
Windows Store Guide
Accelerator
Accelerator
app
app
app.addRecentDocument()
app.clearRecentDocuments()
app.commandLine.appendArgument()
app.commandLine.appendSwitch()
app.disableHardwareAcceleration()
app.dock.bounce()
app.dock.cancelBounce()
app.dock.downloadFinished()
app.dock.getBadge()
app.dock.hide()
app.dock.isVisible()
app.dock.setBadge()
app.dock.setIcon()
app.dock.setMenu()
app.dock.show()
app.exit()
app.focus()
app.getAppMemoryInfo()
app.getAppPath()
app.getBadgeCount()
app.getCurrentActivityType()
app.getFileIcon()
app.getJumpListSettings()
app.getLocale()
app.getLoginItemSettings()
app.getName()
app.getPath()
app.getVersion()
app.hide()
app.importCertificate()
app.isAccessibilitySupportEnabled()
app.isDefaultProtocolClient()
app.isReady()
app.isUnityRunning()
app.makeSingleInstance()
app.quit()
app.relaunch()
app.releaseSingleInstance()
app.removeAsDefaultProtocolClient()
app.setAboutPanelOptions()
app.setAppUserModelId()
app.setAsDefaultProtocolClient()
app.setBadgeCount()
app.setJumpList()
app.setLoginItemSettings()
app.setName()
app.setPath()
app.setUserActivity()
app.setUserTasks()
app.show()
autoUpdater
autoUpdater
autoUpdater.checkForUpdates()
autoUpdater.getFeedURL()
autoUpdater.quitAndInstall()
autoUpdater.setFeedURL()
API: Objects
BluetoothDevice
Certificate
CertificatePrincipal
Cookie
CPUUsage
CrashReport
DesktopCapturerSource
Display
File
FileFilter
IOCounters
JumpListCategory
JumpListItem
MemoryInfo
MemoryUsageDetails
MimeTypedBuffer
Point
ProcessMemoryInfo
Rectangle
RemoveClientCertificate
RemovePassword
ScrubberItem
SegmentedControlSegment
ShortcutDetails
Size
Task
ThumbarButton
UploadBlob
UploadData
UploadFile
UploadFileSystem
UploadRawData
BrowserView
BrowserView
BrowserView()
view.id
view.setAutoResize()
view.setBackgroundColor()
view.setBounds()
view.webContents
BrowserWindow
BrowserWindow
BrowserWindow()
BrowserWindow.addDevToolsExtension()
BrowserWindow.fromId()
BrowserWindow.fromWebContents()
BrowserWindow.getAllWindows()
BrowserWindow.getDevToolsExtensions()
BrowserWindow.getFocusedWindow()
BrowserWindow.removeDevToolsExtension()
win.blur()
win.blurWebView()
win.capturePage()
win.center()
win.close()
win.closeFilePreview()
win.destroy()
win.flashFrame()
win.focus()
win.focusOnWebView()
win.getBounds()
win.getChildWindows()
win.getContentBounds()
win.getContentSize()
win.getMaximumSize()
win.getMinimumSize()
win.getNativeWindowHandle()
win.getParentWindow()
win.getPosition()
win.getRepresentedFilename()
win.getSize()
win.getTitle()
win.hasShadow()
win.hide()
win.hookWindowMessage()
win.id
win.isAlwaysOnTop()
win.isClosable()
win.isDestroyed()
win.isDocumentEdited()
win.isFocused()
win.isFullScreen()
win.isFullScreenable()
win.isKiosk()
win.isMaximizable()
win.isMaximized()
win.isMenuBarAutoHide()
win.isMenuBarVisible()
win.isMinimizable()
win.isMinimized()
win.isModal()
win.isMovable()
win.isResizable()
win.isVisible()
win.isVisibleOnAllWorkspaces()
win.isWindowMessageHooked()
win.loadURL()
win.maximize()
win.minimize()
win.previewFile()
win.reload()
win.restore()
win.setAlwaysOnTop()
win.setAppDetails()
win.setAspectRatio()
win.setAutoHideCursor()
win.setAutoHideMenuBar()
win.setBounds()
win.setBrowserView()
win.setClosable()
win.setContentBounds()
win.setContentProtection()
win.setContentSize()
win.setDocumentEdited()
win.setFocusable()
win.setFullScreen()
win.setFullScreenable()
win.setHasShadow()
win.setIcon()
win.setIgnoreMouseEvents()
win.setKiosk()
win.setMaximizable()
win.setMaximumSize()
win.setMenu()
win.setMenuBarVisibility()
win.setMinimizable()
win.setMinimumSize()
win.setMovable()
win.setOverlayIcon()
win.setParentWindow()
win.setPosition()
win.setProgressBar()
win.setRepresentedFilename()
win.setResizable()
win.setSheetOffset()
win.setSize()
win.setSkipTaskbar()
win.setThumbarButtons()
win.setThumbnailClip()
win.setThumbnailToolTip()
win.setTitle()
win.setTouchBar()
win.setVibrancy()
win.setVisibleOnAllWorkspaces()
win.show()
win.showDefinitionForSelection()
win.showInactive()
win.unhookAllWindowMessages()
win.unhookWindowMessage()
win.unmaximize()
win.webContents
BrowserWindowProxy
BrowserWindowProxy
win.blur()
win.close()
win.closed
win.eval()
win.focus()
win.postMessage()
win.print()
Guides: Development
Build Instructions (Linux)
Build Instructions (macOS)
Build Instructions (Windows)
Build System Overview
Chromium Development
Coding Style
Debugging on macOS
Debugging on Windows
Releasing
Setting Up Symbol Server in Debugger
Source Code Directory Structure
Technical Differences Between Electron and NW.js (formerly node-webkit)
Upgrading Chrome Checklist
Using clang-format on C++ Code
V8 Development
ClientRequest
ClientRequest
ClientRequest()
request.abort()
request.chunkedEncoding
request.end()
request.followRedirect()
request.getHeader()
request.removeHeader()
request.setHeader()
request.write()
clipboard
clipboard
clipboard.availableFormats()
clipboard.clear()
clipboard.has()
clipboard.read()
clipboard.readBookmark()
clipboard.readBuffer()
clipboard.readFindText()
clipboard.readHTML()
clipboard.readImage()
clipboard.readRTF()
clipboard.readText()
clipboard.write()
clipboard.writeBookmark()
clipboard.writeFindText()
clipboard.writeHTML()
clipboard.writeImage()
clipboard.writeRTF()
clipboard.writeText()
webContents
contents.addWorkSpace()
contents.beginFrameSubscription()
contents.canGoBack()
contents.canGoForward()
contents.canGoToOffset()
contents.capturePage()
contents.clearHistory()
contents.closeDevTools()
contents.copy()
contents.copyImageAt()
contents.cut()
contents.debugger
contents.delete()
contents.devToolsWebContents
contents.disableDeviceEmulation()
contents.downloadURL()
contents.enableDeviceEmulation()
contents.endFrameSubscription()
contents.executeJavaScript()
contents.findInPage()
contents.getFrameRate()
contents.getTitle()
contents.getURL()
contents.getUserAgent()
contents.getWebRTCIPHandlingPolicy()
contents.getZoomFactor()
contents.getZoomLevel()
contents.goBack()
contents.goForward()
contents.goToIndex()
contents.goToOffset()
contents.hasServiceWorker()
contents.hostWebContents
contents.id
contents.insertCSS()
contents.insertText()
contents.inspectElement()
contents.inspectServiceWorker()
contents.invalidate()
contents.isAudioMuted()
contents.isCrashed()
contents.isDestroyed()
contents.isDevToolsFocused()
contents.isDevToolsOpened()
contents.isFocused()
contents.isLoading()
contents.isLoadingMainFrame()
contents.isOffscreen()
contents.isPainting()
contents.isWaitingForResponse()
contents.loadURL()
contents.openDevTools()
contents.paste()
contents.pasteAndMatchStyle()
contents.print()
contents.printToPDF()
contents.redo()
contents.reload()
contents.reloadIgnoringCache()
contents.removeWorkSpace()
contents.replace()
contents.replaceMisspelling()
contents.savePage()
contents.selectAll()
contents.send()
contents.sendInputEvent()
contents.session
contents.setAudioMuted()
contents.setFrameRate()
contents.setLayoutZoomLevelLimits()
contents.setSize()
contents.setUserAgent()
contents.setVisualZoomLevelLimits()
contents.setWebRTCIPHandlingPolicy()
contents.setZoomFactor()
contents.setZoomLevel()
contents.setZoomLevelLimits()
contents.showDefinitionForSelection()
contents.startDrag()
contents.startPainting()
contents.stop()
contents.stopFindInPage()
contents.stopPainting()
contents.toggleDevTools()
contents.undo()
contents.unregisterServiceWorker()
contents.unselect()
webContents
webContents.fromId()
webContents.getAllWebContents()
webContents.getFocusedWebContents()
contentTracing
contentTracing
contentTracing.captureMonitoringSnapshot()
contentTracing.getCategories()
contentTracing.getTraceBufferUsage()
contentTracing.startMonitoring()
contentTracing.startRecording()
contentTracing.stopMonitoring()
contentTracing.stopRecording()
Cookies
Cookies
cookies.flushStore()
cookies.get()
cookies.remove()
cookies.set()
crashReporter
crashReporter
crashReporter.getLastCrashReport()
crashReporter.getUploadedReports()
crashReporter.getUploadToServer()
crashReporter.setExtraParameter()
crashReporter.setUploadToServer()
crashReporter.start()
Debugger
Debugger
debugger.attach()
debugger.detach()
debugger.isAttached()
debugger.sendCommand()
desktopCapturer
desktopCapturer
desktopCapturer.getSources()
dialog
dialog
dialog.showCertificateTrustDialog()
dialog.showErrorBox()
dialog.showMessageBox()
dialog.showOpenDialog()
dialog.showSaveDialog()
DownloadItem
DownloadItem
downloadItem.cancel()
downloadItem.canResume()
downloadItem.getContentDisposition()
downloadItem.getETag()
downloadItem.getFilename()
downloadItem.getLastModifiedTime()
downloadItem.getMimeType()
downloadItem.getReceivedBytes()
downloadItem.getSavePath()
downloadItem.getStartTime()
downloadItem.getState()
downloadItem.getTotalBytes()
downloadItem.getURL()
downloadItem.getURLChain()
downloadItem.hasUserGesture()
downloadItem.isPaused()
downloadItem.pause()
downloadItem.resume()
downloadItem.setSavePath()
Environment Variables
ELECTRON_DEFAULT_ERROR_MODE
ELECTRON_ENABLE_LOGGING
ELECTRON_ENABLE_STACK_DUMPING
ELECTRON_FORCE_WINDOW_MENU_BAR
ELECTRON_LOG_ASAR_READS
ELECTRON_NO_ASAR
ELECTRON_NO_ATTACH_CONSOLE
ELECTRON_RUN_AS_NODE
Environment Variables
GOOGLE_API_KEY
ipcMain
event.returnValue
event.sender
ipcMain
ipcMain.on()
ipcMain.once()
ipcMain.removeAllListeners()
ipcMain.removeListener()
Frameless Window
Frameless Window
hidden
hidden-inset
globalShortcut
globalShortcut
globalShortcut.isRegistered()
globalShortcut.register()
globalShortcut.unregister()
globalShortcut.unregisterAll()
nativeImage
image.addRepresentation()
image.crop()
image.getAspectRatio()
image.getBitmap()
image.getNativeHandle()
image.getSize()
image.isEmpty()
image.isTemplateImage()
image.resize()
image.setTemplateImage()
image.toBitmap()
image.toDataURL()
image.toJPEG()
image.toPNG()
nativeImage
nativeImage.createEmpty()
nativeImage.createFromBuffer()
nativeImage.createFromDataURL()
nativeImage.createFromPath()
IncomingMessage
IncomingMessage
response.headers
response.httpVersion
response.httpVersionMajor
response.httpVersionMinor
response.statusCode
response.statusMessage
ipcRenderer
ipcRenderer
ipcRenderer.on()
ipcRenderer.once()
ipcRenderer.removeAllListeners()
ipcRenderer.removeListener()
ipcRenderer.send()
ipcRenderer.sendSync()
ipcRenderer.sendToHost()
Locales
Locales
Menu
Menu
Menu()
menu.append()
Menu.buildFromTemplate()
menu.closePopup()
Menu.getApplicationMenu()
menu.insert()
menu.items
menu.popup()
Menu.sendActionToFirstResponder()
Menu.setApplicationMenu()
MenuItem
MenuItem
MenuItem()
menuItem.checked
menuItem.click
menuItem.enabled
menuItem.label
menuItem.visible
net
net
net.request()
powerMonitor
powerMonitor
powerSaveBlocker
powerSaveBlocker
powerSaveBlocker.isStarted()
powerSaveBlocker.start()
powerSaveBlocker.stop()
process
process
process.crash()
process.defaultApp
process.getCPUUsage()
process.getIOCounters()
process.getProcessMemoryInfo()
process.getSystemMemoryInfo()
process.hang()
process.mas
process.noAsar
process.resourcesPath
process.setFdLimit()
process.type
process.versions.chrome
process.versions.electron
process.windowsStore
protocol
protocol
protocol.interceptBufferProtocol()
protocol.interceptFileProtocol()
protocol.interceptHttpProtocol()
protocol.interceptStringProtocol()
protocol.isProtocolHandled()
protocol.registerBufferProtocol()
protocol.registerFileProtocol()
protocol.registerHttpProtocol()
protocol.registerServiceWorkerSchemes()
protocol.registerStandardSchemes()
protocol.registerStringProtocol()
protocol.uninterceptProtocol()
protocol.unregisterProtocol()
remote
remote
remote.getCurrentWebContents()
remote.getCurrentWindow()
remote.getGlobal()
remote.process
remote.require()
sandbox
sandbox
screen
screen
screen.getAllDisplays()
screen.getCursorScreenPoint()
screen.getDisplayMatching()
screen.getDisplayNearestPoint()
screen.getPrimaryDisplay()
session
ses.allowNTLMCredentialsForDomains()
ses.clearAuthCache()
ses.clearCache()
ses.clearHostResolverCache()
ses.clearStorageData()
ses.cookies
ses.createInterruptedDownload()
ses.disableNetworkEmulation()
ses.enableNetworkEmulation()
ses.flushStorageData()
ses.getBlobData()
ses.getCacheSize()
ses.getUserAgent()
ses.protocol
ses.resolveProxy()
ses.setCertificateVerifyProc()
ses.setDownloadPath()
ses.setPermissionRequestHandler()
ses.setProxy()
ses.setUserAgent()
ses.webRequest
session
session.defaultSession
session.fromPartition()
shell
shell
shell.beep()
shell.moveItemToTrash()
shell.openExternal()
shell.openItem()
shell.readShortcutLink()
shell.showItemInFolder()
shell.writeShortcutLink()
API
Supported Chrome Command Line Switches
Synopsis
systemPreferences
systemPreferences
systemPreferences.getAccentColor()
systemPreferences.getColor()
systemPreferences.getUserDefault()
systemPreferences.isAeroGlassEnabled()
systemPreferences.isDarkMode()
systemPreferences.isInvertedColorScheme()
systemPreferences.isSwipeTrackingFromScrollEventsEnabled()
systemPreferences.postLocalNotification()
systemPreferences.postNotification()
systemPreferences.setUserDefault()
systemPreferences.subscribeLocalNotification()
systemPreferences.subscribeNotification()
systemPreferences.unsubscribeLocalNotification()
systemPreferences.unsubscribeNotification()
TouchBar
TouchBar
TouchBar()
touchBar.escapeItem
TouchBarButton
TouchBarButton
TouchBarButton()
touchBarButton.backgroundColor
touchBarButton.icon
touchBarButton.label
TouchBarColorPicker
TouchBarColorPicker
TouchBarColorPicker()
touchBarColorPicker.availableColors
touchBarColorPicker.selectedColor
TouchBarGroup
TouchBarGroup
TouchBarGroup()
TouchBarLabel
TouchBarLabel
TouchBarLabel()
touchBarLabel.label
touchBarLabel.textColor
TouchBarPopover
TouchBarPopover
TouchBarPopover()
touchBarPopover.icon
touchBarPopover.label
TouchBarScrubber
TouchBarScrubber
TouchBarScrubber()
touchBarSegmentedControl.continuous
touchBarSegmentedControl.items
touchBarSegmentedControl.mode
touchBarSegmentedControl.overlayStyle
touchBarSegmentedControl.selectedStyle
touchBarSegmentedControl.showArrowButtons
TouchBarSegmentedControl
TouchBarSegmentedControl
TouchBarSegmentedControl()
touchBarSegmentedControl.segments
touchBarSegmentedControl.segmentStyle
touchBarSegmentedControl.selectedIndex
TouchBarSlider
TouchBarSlider
TouchBarSlider()
touchBarSlider.label
touchBarSlider.maxValue
touchBarSlider.minValue
touchBarSlider.value
TouchBarSpacer
TouchBarSpacer
TouchBarSpacer()
Tray
Tray
Tray()
tray.destroy()
tray.displayBalloon()
tray.getBounds()
tray.isDestroyed()
tray.popUpContextMenu()
tray.setContextMenu()
tray.setHighlightMode()
tray.setImage()
tray.setPressedImage()
tray.setTitle()
tray.setToolTip()
webFrame
webFrame
webFrame.clearCache()
webFrame.executeJavaScript()
webFrame.getResourceUsage()
webFrame.getZoomFactor()
webFrame.getZoomLevel()
webFrame.insertText()
webFrame.registerURLSchemeAsBypassingCSP()
webFrame.registerURLSchemeAsPrivileged()
webFrame.registerURLSchemeAsSecure()
webFrame.setLayoutZoomLevelLimits()
webFrame.setSpellCheckProvider()
webFrame.setVisualZoomLevelLimits()
webFrame.setZoomFactor()
webFrame.setZoomLevel()
webFrame.setZoomLevelLimits()
WebRequest
WebRequest
webRequest.onBeforeRedirect()
webRequest.onBeforeRequest()
webRequest.onBeforeSendHeaders()
webRequest.onCompleted()
webRequest.onErrorOccurred()
webRequest.onHeadersReceived()
webRequest.onResponseStarted()
webRequest.onSendHeaders()
window.open
window.open
window.open()
window.opener.postMessage()
Index
index