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. 11 de feb. de 2021 · Modified 8 months ago. Viewed 14k times. 10. I defined contextBridge ( https://www.electronjs.org/docs/all#contextbridge ) in preload.js as follows: const { contextBridge, ipcRenderer. } = require("electron") contextBridge.exposeInMainWorld( "api", { send: (channel, data) => { ipcRenderer.invoke(channel, data).catch(e => console.log(e)) },

  5. 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');

  6. 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.

  7. 22 de dic. de 2020 · const { contextBridge, ipcRenderer } = require("electron") contextBridge.exposeInMainWorld( "api", { send: (channel, data) => { ipcRenderer.invoke(channel, data).catch(e => console.log(e)) }, receive: (channel, func) => { ipcRenderer.on(channel, (event, ...args) => func(...args)) //ipcRenderer.on(channel, (event, ...args ...