![]() ![]() Modifying them in the renderer process does not modify them in the main Note: Arrays and Buffers are copied over IPC when accessed via the remote When the remote object is first referenced are accessible via remote. Note: Only enumerable properties which are present Returned the corresponding remote object in the renderer process, namely the Instead, it created a BrowserWindow object in the main process and New BrowserWindow didn't create a BrowserWindow object in the renderer In the example above, both BrowserWindow and win were remote objects and When you invoke methods of a remote object, call a remote function, or createĪ new object with the remote constructor (function), you are actually sending Object in the main process (we call it a remote object or remote function). Note: In electron >= 14.0.0 the remote module is disabled by default for any WebContents instance and is only enabled for specified WebContents after explicitly calling electron - by setting the enableremotemodule attribute to false.Įach object (including functions) returned by the remote module represents an An example of creating a browser window from a Of the main process object without explicitly sending inter-process messages, With the remote module, you can invoke methods In order to use themįrom the renderer process, the ipc module is necessary to send inter-process In Electron, GUI-related modules (such as dialog, menu etc.) are onlyĪvailable in the main process, not in the renderer process. (IPC) between the renderer process (web page) and the main process. The remote module provides a simple way to do inter-process communication The constructor of BrowserWindows that should be granted permission to API Reference in the renderer process: // Before const to ![]()
0 Comments
Leave a Reply. |