Yahoo Search Búsqueda en la Web

Resultado de búsqueda

  1. Métodos. El módulo contextBridge tiene los siguientes métodos: contextBridge.exposeInMainWorld(apiKey, api) apiKey string - La clave para inyectar la API en la ventana window. La API será accesible en window[apiKey]. api any - Tu API más información sobre qué puede ser esta API y como funciona esta disponible a continuación.

  2. The contextBridge module has the following methods: contextBridge.exposeInMainWorld(apiKey, api) apiKey string - The key to inject the API onto window with. The API will be accessible on window[apiKey]. api any - Your API, more information on what this API can be and how it works is available below.

  3. 30 de ene. de 2020 · process.once('loaded', => { const { contextBridge, ipcRenderer, shell } = require('electron') contextBridge.exposeInMainWorld('electron', { on (eventName, callback) { ipcRenderer.on(eventName, callback) }, async invoke (eventName, ...params) { return await ipcRenderer.invoke(eventName, ...params) }, async shellOpenExternal (url ...

  4. El objeto contextBridge que nos ofrece Electrón es el responsable de hacer de puente, enviando información a la página web que se ejecuta en la ventana, así como recibiendo órdenes para ejecutar funcionalidades incorporadas. Para acceder a este objeto hacemos el siguiente require: const { contextBridge } = require('electron');

  5. Usage. API. The api provided to exposeInMainWorld must be a Function, string, number, Array, boolean, or an object whose keys are strings and values are a Function, string, number, Array, boolean, or another nested object that meets the same conditions. Function values are proxied to the other context and all other values are copied and frozen.

  6. The contextBridge module has the following methods: contextBridge.exposeInMainWorld(apiKey, api) apiKey string - The key to inject the API onto window with. The API will be accessible on window[apiKey]. api any - Your API, more information on what this API can be and how it works is available below.

  7. contextBridge.exposeInMainWorld('myAPI', { doAThing: () => {} }) renderer.js. // use the exposed API in the renderer. window.myAPI.doAThing() Please read the contextBridge documentation linked above to fully understand its limitations. For instance, you can't send custom prototypes or symbols over the bridge.