id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
Electron/Electron_6_23.txt
s * [ Electron Forge ](https://electronforge.io) * [ Electron Fiddle ](/fiddle) Community * [ Governance ](/governance) * [ Resources ](/community) * [ Discord ](https://discordapp.com/invite/APGC3k5yaH) * [ Twitter ](https://twitter.com/electronjs) * [ Mastodon ](https://social.lfx.dev/@electronjs)...
Electron/web-contents8_260_0.txt
#### ` contents.closeDevTools() ` ​ Closes the devtools.
Electron/recording-the-entire-desktop-in-angular-98_26_0.txt
Improve this question Follow
Electron/web-contents8_204_0.txt
Returns ` number ` \- the current zoom factor. #### ` contents.setZoomLevel(level) ` ​
Electron/web-contents8_271_0.txt
Returns SharedWorkerInfo[] \- Information about all Shared Workers. #### ` contents.inspectServiceWorker() ` ​
Electron/web-contents8_17_0.txt
## Methods ​ These methods can be accessed from the ` webContents ` module:
Electron/web-contents8_200_0.txt
Returns ` boolean ` \- Whether this page has been muted. #### ` contents.isCurrentlyAudible() ` ​
Electron/Using_Screen_Capture8_49_0.txt
The ` promise ` returned by ` getDisplayMedia() ` resolves to a ` MediaStream ` that contains at least one video stream that contains the screen or screen area, and which is adjusted or filtered based upon the constraints specified when ` getDisplayMedia() ` was called. ### Potential risks
Electron/web-contents8_105_0.txt
* ` event ` Event * ` authenticationResponseDetails ` Object * ` url ` URL * ` authInfo ` Object * ` isProxy ` boolean * ` scheme ` string * ` host ` string * ` port ` Integer * ` realm ` string * ` callback ` Function * ` username ` string (optional) * ` password ` st...
Electron/web-contents8_321_0.txt
An ` IpcMain ` scoped to just IPC messages sent from this WebContents. IPC messages sent with ` ipcRenderer.send ` , ` ipcRenderer.sendSync ` or ` ipcRenderer.postMessage ` will be delivered in the following order:
Electron/Electron_6_1.txt
ow-customization) tutorial. ## Showing the window gracefully ​ When loading a page in the window directly, users may see the page load incrementally, which is not a good experience for a native app. To make the window display without a visual flash, there are two solutions for different situations. ### Using th...
Electron/recording-the-entire-desktop-in-angular-98_78_0.txt
##### Company * About * Press * Work Here * Legal * Privacy Policy * Terms of Service * Contact Us * Cookie Settings * Cookie Policy
Electron/Using_Screen_Capture8_34_0.txt
Either way, the user agent responds by presenting a user interface that prompts the user to choose the screen area to share. Both of these implementations of ` startCapture() ` return the ` MediaStream ` containing the captured display imagery. See Options and constraints , below, for more on both how to specify ...
Electron/Using_Screen_Capture8_58_0.txt
##### Logging content This example overrides certain ` console ` methods to output their messages to the ` <pre> ` block whose ID is ` log ` .
Electron/web-contents8_214_0.txt
#### ` contents.centerSelection() ` ​ Centers the current text selection in web page.
Electron/web-contents8_54_0.txt
Calling ` event.preventDefault() ` will prevent the navigation. #### Event: 'did-start-navigation' ​
Electron/Electron_6_12.txt
utton of the window. The web page may cancel the close though. See the close event . #### ` win.focus() ` ​ Focuses on the window. #### ` win.blur() ` ​ Removes focus from the window. #### ` win.isFocused() ` ​ Returns ` boolean ` \- Whether the window is focused. #### ` win.isDestroyed() ` ​ Retu...
Electron/web-contents8_86_0.txt
#### Event: 'leave-html-full-screen' ​ Emitted when the window leaves a full-screen state triggered by HTML API.
Electron/Using_Screen_Capture8_10_0.txt
* MDN Learning Area Learn web development
Electron/web-contents8_317_0.txt
#### ` contents.getType() ` ​ Returns ` string ` \- the type of the webContent. Can be ` backgroundPage ` , ` window ` , ` browserView ` , ` remote ` , ` webview ` or ` offscreen ` .
Electron/web-contents8_255_0.txt
An example of showing devtools in a ` <webview> ` tag: <html> <head> <style type="text/css"> * { margin: 0; } #browser { height: 70%; } #devtools { height: 30%; } </style> </head> <body> <webview id="browser" src="https://github.com"...
Electron/1941460_19_0.txt
Habr Facebook Twitter Telegram
Electron/web-contents8_291_0.txt
* ` item ` Object * ` file ` string - The path to the file being dragged. * ` files ` string[] (optional) - The paths to the files being dragged. ( ` files ` will override ` file ` field) * ` icon ` NativeImage | string - The image must be non-empty on macOS. Sets the ` item ` as dragging item for c...
Electron/web-contents8_162_0.txt
Returns ` boolean ` \- Whether the web page is focused. #### ` contents.isLoading() ` ​
Electron/1941460_9_0.txt
const { contextBridge, ipcRenderer } = require('electron'); contextBridge.exposeInMainWorld('electronApi', { main: { isOSX: () => process.platform === 'darwin', isWindows: () => process.platform === 'win32', isLinux: () => /linux/.test(process.platform), openScreenSec...
Electron/web-contents8_81_0.txt
* ` event ` Event * ` inputEvent ` InputEvent Emitted when an input event is sent to the WebContents. See InputEvent for details.
Electron/web-contents8_290_0.txt
End subscribing for frame presentation events. #### ` contents.startDrag(item) ` ​
Electron/web-contents8_318_0.txt
#### ` contents.setImageAnimationPolicy(policy) ` ​ * ` policy ` string - Can be ` animate ` , ` animateOnce ` or ` noAnimation ` .
Electron/web-contents8_99_0.txt
#### Event: 'certificate-error' ​ Returns:
Electron/Using_Screen_Capture8_42_0.txt
### Capturing shared audio ` getDisplayMedia() ` is most commonly used to capture video of a user's screen (or parts thereof). However, user agents may allow the capture of audio along with the video content. The source of this audio might be the selected window, the entire computer's audio system, or the user's mi...
Electron/web-contents8_303_0.txt
#### ` contents.getWebRTCIPHandlingPolicy() ` ​ Returns ` string ` \- Returns the WebRTC IP Handling Policy.
Electron/web-contents8_306_0.txt
Returns ` Object ` : * ` min ` Integer - The minimum UDP port number that WebRTC should use. * ` max ` Integer - The maximum UDP port number that WebRTC should use.
Electron/Electron_6_22.txt
reenable ` * ` resizable ` * ` closable ` * ` movable ` * ` excludedFromShownWindowsMenu ` * ` accessibleTitle ` * Instance Methods * ` destroy ` * ` close ` * ` focus ` * ` blur ` * ` isFocused ` * ` isDestroyed ` * ` show ` * ` showIna...
Electron/web-contents8_307_0.txt
By default this value is ` { min: 0, max: 0 } ` , which would apply no restriction on the udp port range. #### ` contents.setWebRTCUDPPortRange(udpPortRange) ` ​
Electron/recording-the-entire-desktop-in-angular-98_58_0.txt
* The reverse mullett model of software engineering * Featured on Meta * Testing a new version of Stack Overflow Jobs
Electron/web-contents8_46_0.txt
Emitted after successful creation of a window via ` window.open ` in the renderer. Not emitted if the creation of the window is canceled from ` webContents.setWindowOpenHandler ` . See ` window.open() ` for more details and how to use this in conjunction with ` webContents.setWindowOpenHandler ` .
Electron/web-contents8_164_0.txt
Returns ` boolean ` \- Whether the main frame (and not just iframes or frames within it) is still loading. #### ` contents.isWaitingForResponse() ` ​
Electron/Electron_2_3.txt
traParameter(key) ` ​ See ` crashReporter.removeExtraParameter(key) ` . ## Crash Report Payload ​ The crash reporter will send the following data to the ` submitURL ` as a ` multipart/form-data ` ` POST ` : * ` ver ` string - The version of Electron. * ` platform ` string - e.g. 'win32'. * ` process_...
Electron/Using_Screen_Capture8_32_0.txt
You can write this code either using an asynchronous function and the ` await ` operator, as shown above, or using the ` Promise ` directly, as seen below. ### Starting screen capture: ` Promise ` style
Electron/web-contents8_346_0.txt
Community * Governance * Resources * Discord * Twitter * Mastodon * Stack Overflow
Electron/web-contents8_192_0.txt
#### ` contents.executeJavaScriptInIsolatedWorld(worldId, scripts[, userGesture]) ` ​ * ` worldId ` Integer - The ID of the world to run the javascript in, ` 0 ` is the default world, ` 999 ` is the world used by Electron's ` contextIsolation ` feature. You can provide any integer here. * ` scripts ` WebSource...
Electron/web-contents8_72_0.txt
const { BrowserWindow, dialog } = require('electron') const win = new BrowserWindow({ width: 800, height: 600 }) win.webContents.on('will-prevent-unload', (event) => { const choice = dialog.showMessageBoxSync(win, { type: 'question', buttons: ['Leave', 'Stay'], ...
Electron/Using_Screen_Capture8_31_0.txt
js async function startCapture(displayMediaOptions) { let captureStream = null; try { captureStream = await navigator.mediaDevices.getDisplayMedia(displayMediaOptions); } catch (err) { console.error(`Error: ${err}`); } return captureStream; ...
Electron/web-contents8_329_0.txt
#### ` contents.frameRate ` ​ An ` Integer ` property that sets the frame rate of the web contents to the specified number. Only values between 1 and 240 are accepted.
Electron/recording-the-entire-desktop-in-angular-98_31_0.txt
– user3071120 May 26, 2020 at 19:36
Electron/recording-the-entire-desktop-in-angular-98_3_0.txt
* Stack Overflow help chat
Electron/web-contents8_293_0.txt
Returns ` Promise<void> ` \- resolves if the page is saved. const { BrowserWindow } = require('electron') const win = new BrowserWindow() win.loadURL('https://github.com') win.webContents.on('did-finish-load', async () => { win.webContents.savePage('/tmp/test.html'...
Electron/Using_Screen_Capture8_48_0.txt
Capturing audio is always optional, and even when web content requests a stream with both audio and video, the returned ` MediaStream ` may still have only one video track, with no audio. ## Using the captured stream
Electron/Using_Screen_Capture8_77_0.txt
Permissions-Policy: display-capture=(self) If you're performing screen capture within an ` <iframe> ` , you can request permission just for that frame, which is clearly more secure than requesting permission more generally:
Electron/web-contents8_63_0.txt
* ` event ` Event * ` url ` string * ` httpResponseCode ` Integer - -1 for non HTTP navigations * ` httpStatusText ` string - empty for non HTTP navigations Emitted when a main frame navigation is done.
Electron/Using_Screen_Capture8_55_0.txt
##### Setup First, some constants are set up to reference the elements on the page to which we'll need access: the ` <video> ` into which the captured screen contents will be streamed, a box into which logged output will be drawn, and the start and stop buttons that will turn on and off capture of screen imagery.
Electron/web-contents8_342_0.txt
WebContentsView * Navigation Events * Document Navigations * In-page Navigation * Frame Navigation * Methods * ` getAllWebContents ` * ` getFocusedWebContents ` * ` fromId ` * ` fromFrame ` * ` fromDevToolsTargetId ` * Class: WebContents * Instance Events * ` 'did...
Electron/web-contents8_221_0.txt
Executes the editing command ` unselect ` in web page. #### ` contents.scrollToTop() ` ​
Electron/web-contents8_44_0.txt
By default, this will move the window. To prevent that behavior, call ` event.preventDefault() ` . #### Event: 'did-create-window' ​
Electron/Electron_2_0.txt
Skip to main content [ ![Electron homepage](/assets/img/logo.svg) ![Electron homepage](/assets/img/logo.svg) **Electron** ](/) [ Docs ](/docs/latest/) [ API ](/docs/latest/api/app) [ Blog ](/blog) Tools * [ Electron Forge ](https://electronforge.io) * [ Electron Fiddle ](/fiddle) Community * [ Governance ](/...
Electron/Using_Screen_Capture8_81_0.txt
## Help improve MDN Was this page helpful to you?
Electron/web-contents8_190_0.txt
Evaluates ` code ` in page. In the browser window some HTML APIs like ` requestFullScreen ` can only be invoked by a gesture from the user. Setting ` userGesture ` to ` true ` will remove this limitation.
Electron/recording-the-entire-desktop-in-angular-98_6_0.txt
company blog 2. 3. Log in 4. Sign up
Electron/Using_Screen_Capture8_4_0.txt
* JavaScript General-purpose scripting language
Electron/Using_Screen_Capture8_8_0.txt
* Web Technology Web technology reference for developers
Electron/web-contents8_30_0.txt
* ` event ` Event * ` errorCode ` Integer * ` errorDescription ` string * ` validatedURL ` string * ` isMainFrame ` boolean * ` frameProcessId ` Integer * ` frameRoutingId ` Integer This event is like ` did-finish-load ` but emitted when the load failed. The full list of error codes and their mean...
Electron/web-contents8_27_0.txt
Process: Main This class is not exported from the ` 'electron' ` module. It is only available as a return value of other methods in the Electron API. ### Instance Events ​
Electron/1941460_3_0.txt
Pull to refresh Jun 17 2023 at 00:35
Electron/web-contents8_18_0.txt
const { webContents } = require('electron') console.log(webContents) ### ` webContents.getAllWebContents() ` ​
Electron/recording-the-entire-desktop-in-angular-98_27_0.txt
asked May 26, 2020 at 13:12 user3071120 user3071120
Electron/web-contents8_119_0.txt
If the ` type ` parameter is ` custom ` , the ` image ` parameter will hold the custom cursor image in a ` NativeImage ` , and ` scale ` , ` size ` and ` hotspot ` will hold additional information about the custom cursor. #### Event: 'context-menu' ​
Electron/web-contents8_207_0.txt
Returns ` number ` \- the current zoom level. #### ` contents.setVisualZoomLevelLimits(minimumLevel, maximumLevel) ` ​
Electron/web-contents8_273_0.txt
* ` channel ` string * ` ...args ` any[] Send an asynchronous message to the renderer process via ` channel ` , along with arguments. Arguments will be serialized with the Structured Clone Algorithm , just like ` postMessage ` , so prototype chains will not be included. Sending Functions, Promises, Symbols, W...
Electron/Using_Screen_Capture8_45_0.txt
This allows the user total freedom to select whatever they want, within the limits of what the user agent supports. This could be refined further by specifying additional options, and constraints inside the ` audio ` and ` video ` objects: js
Electron/web-contents8_172_0.txt
#### ` contents.clearHistory() ` ​ Clears the navigation history.
Electron/web-contents8_191_0.txt
Code execution will be suspended until web page stop loading. const win = new BrowserWindow() win.webContents.executeJavaScript('fetch("https://jsonplaceholder.typicode.com/users/1").then(resp => resp.json())', true) .then((result) => { console.log(result) // Will be the JS...
Electron/web-contents8_68_0.txt
* ` event ` Event * ` url ` string * ` isMainFrame ` boolean * ` frameProcessId ` Integer * ` frameRoutingId ` Integer Emitted when an in-page navigation happened in any frame.
Electron/recording-the-entire-desktop-in-angular-98_7_0.txt
1. 1. Home 2. Questions
Electron/web-contents8_257_0.txt
const { app, BrowserWindow } = require('electron') let win = null let devtools = null app.whenReady().then(() => { win = new BrowserWindow() devtools = new BrowserWindow() win.loadURL('https://github.com') win.webContents.setDevToolsWebConten...
Electron/recording-the-entire-desktop-in-angular-98_52_0.txt
Required, but never shown ### Post as a guest
Electron/web-contents8_261_0.txt
#### ` contents.isDevToolsOpened() ` ​ Returns ` boolean ` \- Whether the devtools is opened.
Electron/recording-the-entire-desktop-in-angular-98_75_0.txt
To subscribe to this RSS feed, copy and paste this URL into your RSS reader. lang-js
Electron/1941460_8_0.txt
The next step is to add the necessary methods for communication from the renderer process to the main process. Let's navigate to the ` preload.js ` file where we will utilize the ` contextBridge ` and ` ipcRenderer ` modules provided by Electron. Since we only want to receive a single response from the main process, s...
Electron/recording-the-entire-desktop-in-angular-98_42_0.txt
19 7 7 bronze badges 0
Electron/web-contents8_279_0.txt
You can also read ` frameId ` from all incoming IPC messages in the main process. // In the main process ipcMain.on('ping', (event) => { console.info('Message came from frameId:', event.frameId) })
Electron/Using_Screen_Capture8_7_0.txt
* Web Extensions Developing extensions for web browsers
Electron/Electron_7_0.txt
Skip to main content [ ![Electron homepage](/assets/img/logo.svg) ![Electron homepage](/assets/img/logo.svg) **Electron** ](/) [ Docs ](/docs/latest/) [ API ](/docs/latest/api/app) [ Blog ](/blog) Tools * [ Electron Forge ](https://electronforge.io) * [ Electron Fiddle ](/fiddle) Community * [ Governance ](/...
Electron/web-contents8_135_0.txt
Emitted when the associated window logs a console message. #### Event: 'preload-error' ​
Electron/web-contents8_304_0.txt
#### ` contents.setWebRTCIPHandlingPolicy(policy) ` ​ * ` policy ` string - Specify the WebRTC IP Handling Policy. * ` default ` \- Exposes user's public and local IPs. This is the default behavior. When this policy is used, WebRTC has the right to enumerate all interfaces and bind them to discover public in...
Electron/Using_Screen_Capture8_2_0.txt
* HTML Structure of content on the web
Electron/web-contents8_324_0.txt
#### ` contents.audioMuted ` ​ A ` boolean ` property that determines whether this page is muted.
Electron/web-contents8_218_0.txt
Executes the editing command ` pasteAndMatchStyle ` in web page. #### ` contents.delete() ` ​
Electron/Using_Screen_Capture8_63_0.txt
The stream is connected to the ` <video> ` element by storing the returned ` MediaStream ` into the element's ` srcObject ` . The ` dumpOptionsInfo() ` function—which we will look at in a moment—dumps information about the stream to the log box for educational purposes.
Electron/web-contents8_239_0.txt
Returns ` boolean ` \- Whether this page is being captured. It returns true when the capturer count is large then 0. #### ` contents.getPrintersAsync() ` ​
Electron/Using_Screen_Capture8_19_0.txt
* FAQ Frequently asked questions about MDN Plus
Electron/web-contents8_285_0.txt
Disable device emulation enabled by ` webContents.enableDeviceEmulation ` . #### ` contents.sendInputEvent(inputEvent) ` ​
Electron/web-contents8_78_0.txt
* ` event ` Event * ` name ` string * ` version ` string Emitted when a plugin process has crashed.
Electron/web-contents8_103_0.txt
Emitted when a client certificate is requested. The usage is the same with the ` select-client-certificate ` event of ` app ` .
Electron/web-contents8_132_0.txt
Returns: * ` event ` Event * ` webContents ` WebContents - The guest web contents that is used by the ` <webview> ` .
Electron/Using_Screen_Capture8_71_0.txt
The key parts of the HTML are: 1. A ` <button> ` labeled "Start Capture" which, when clicked, calls the ` startCapture() ` function to request access to, and begin capturing, screen contents. 2. A second button, "Stop Capture", which upon being clicked calls ` stopCapture() ` to terminate capture of screen conte...
Electron/web-contents8_131_0.txt
This event can be used to configure ` webPreferences ` for the ` webContents ` of a ` <webview> ` before it's loaded, and provides the ability to set settings that can't be set via ` <webview> ` attributes. #### Event: 'did-attach-webview' ​
Electron/web-contents8_52_0.txt
Emitted when a user or the page wants to start navigation in any frame. It can happen when the ` window.location ` object is changed or a user clicks a link in the page. Unlike ` will-navigate ` , ` will-frame-navigate ` is fired when the main frame or any of its subframes attempts to navigate. When the navigation eve...
Electron/web-contents8_107_0.txt
Returns: * ` event ` Event * ` result ` Object * ` requestId ` Integer * ` activeMatchOrdinal ` Integer - Position of the active match. * ` matches ` Integer - Number of Matches. * ` selectionArea ` Rectangle - Coordinates of first match region. * ` finalUpdate ` boolean
Electron/web-contents8_229_0.txt
#### ` contents.replaceMisspelling(text) ` ​ * ` text ` string
Electron/web-contents8_102_0.txt
Returns: * ` event ` Event * ` url ` URL * ` certificateList ` Certificate[] * ` callback ` Function * ` certificate ` Certificate \- Must be a certificate from the given list.