Web Embeds | Electron
https://www.electronjs.org/es/docs/latest/tutorial/web-embeds • 41 KB fetched Open original page
Web Embeds | Electron etiquetas, etiquetas y WebContentsView. Cada una ofrece una funcionalidad ligeramente diferente y es útil en diferentes situaciones. To help you choose between these, this guide explains the differences and capabilities of each option."/> etiquetas, etiquetas y WebContentsView. Cada una ofrece una funcionalidad ligeramente diferente y es útil en diferentes situaciones. To help you choose between these, this guide explains the differences and capabilities of each option."/>
Saltar al contenido principal
Electron Documentación API Blog Herramientas
* Electron Forge
* Electron Fiddle
Comunidad
* Gobernanza
* Muestra
* Recursos
Lanzamientos Español
* English
* Deutsch
* Español
* Français
* 日本語
* Português
* Русский
* 中文
Búsqueda
* Empezar
* Procesos en Electron
* Mejores Prácticas
* Ejemplos
* Modo oscuro
* Acceso del dispositivo
* In-App Purchases
*
* Atajos del teclado
* Deep Links
* Acciones de Launcher de Escritorio
*
* Menus
* Multithreading
* Función nativa de Arrastrar y Soltar archivo
* Historial de Navegación
* Notificaciones
* Representación fuera de la pantalla
* Detección de eventos online y Offline
* Progress Bars
* Documentos recientes
*
*
* Representing Files in a BrowserWindow
*
* SpellChecker
* Web Embeds
* Personalización de la barra de tareas
*
* Personalización de Ventana
* Desarrollo
* Native Node Modules
* Distribución
* Pruebas y depuración
* Referencias
* Contribuyentes
*
* Ejemplos
* Web Embeds En esta página
Web Embeds
Descripción general
Si quiere incrustar contenido web (de terceros) en un BrowserWindow de Electron, hay tres opciones disponible para usted: <iframe> tags, <webview> tags, y WebContentsView . Cada una ofrece una funcionalidad ligeramente diferente y es útil en diferentes situaciones. To help you choose between these, this guide explains the differences and capabilities of each option.
Iframes
Iframes en Electron se comportan como iframes en los navegadores regulares. An <iframe> element in your page can show external web pages, provided that their Content Security Policy allows it. To limit the number of capabilities of a site in an <iframe> tag, it is recommended to use the sandbox attribute and only allow the capabilities you want to support.
WebViews
info
We do not recommend you to use WebViews , as this tag undergoes dramatic architectural changes that may affect stability of your application. Consider switching to alternatives, like iframe and Electron's WebContentsView , or an architecture that avoids embedded content by design.
WebViews are based on Chromium's WebViews and are not explicitly supported by Electron. No garantizamos que la API WebView permanezca disponible en versiones futuro de Electron. Para usar <webview> etiquetas, necesitaras establecer webviewTag a true en el webPreferences de tu BrowserWindow .
WebView es un elemento personalizado ( <webview> ) que sólo funcionara dentro de Electron. Están implementadas como un "iframe fuera de proceso". Esto quiere decir que toda la comunicación con el <webview> se hace de forma asíncrona usando IPC. The <webview> element has many custom methods and events, similar to webContents , that provide you with greater control over the content.
Compared to an <iframe> , <webview> tends to be slightly slower but offers much greater control in loading and communicating with the third-party content and handling various events.
WebContentsView
WebContentsView s are not a part of the DOM—instead, they are created, controlled, positioned, and sized by your Main process. Using WebContentsView , you can combine and layer many pages together in the same BaseWindow .
WebContentsView s offer the greatest control over their contents, since they implement the webContents similarly to how BrowserWindow does it. However, as WebContentsView s are not elements inside the DOM, positioning them accurately with respect to DOM content requires coordination between the Main and Renderer processes.
Editar esta página
Anterior
SpellChecker
Siguiente
Personalización de la barra de tareas
* Descripción general
* Iframes
* WebViews
* WebContentsView
Documentación
* Empezar
* Referencia de la API
Listas de verificación
* Rendimiento
* Seguridad
Herramientas
* Electron Forge
* Electron Fiddle
Comunidad
* Gobernanza
* Recursos
* Discord
* Bluesky
* X
* Mastodon
* Stack Overflow
Más
* GitHub
* Open Collective
* Infraestructura de Pizarra
Hosting and infrastructure graciously provided by
Links found on this page
- Saltar al contenido principal [direct]
- Electron [direct]
- Documentación [direct]
- API [direct]
- Blog [direct]
- Electron Forge [direct]
- Electron Fiddle [direct]
- Gobernanza [direct]
- Muestra [direct]
- Recursos [direct]
- Lanzamientos [direct]
- English [direct]
- Deutsch [direct]
- Français [direct]
- 日本語 [direct]
- Português [direct]
- Русский [direct]
- 中文 [direct]
- Procesos en Electron [direct]
- Mejores Prácticas [direct]
- Ejemplos [direct]
- Modo oscuro [direct]
- Acceso del dispositivo [direct]
- In-App Purchases [direct]
- Atajos del teclado [direct]
- Deep Links [direct]
- Acciones de Launcher de Escritorio [direct]
- Menus [direct]
- Multithreading [direct]
- Función nativa de Arrastrar y Soltar archivo [direct]
- Historial de Navegación [direct]
- Notificaciones [direct]
- Representación fuera de la pantalla [direct]
- Detección de eventos online y Offline [direct]
- Progress Bars [direct]
- Documentos recientes [direct]
- Representing Files in a BrowserWindow [direct]
- SpellChecker [direct]
- Personalización de la barra de tareas [direct]
- Personalización de Ventana [direct]
- Desarrollo [direct]
- Native Node Modules [direct]
- Distribución [direct]
- Pruebas y depuración [direct]
- Referencias [direct]
- Contribuyentes [direct]
- Content Security Policy [direct]
- sandbox attribute [direct]
- We do not recommend you to use WebViews [direct]
- WebContentsView [direct]
- BaseWindow [direct]
- Editar esta página [direct]
- Seguridad [direct]
- Discord [direct]
- Bluesky [direct]
- X [direct]
- Mastodon [direct]
- Stack Overflow [direct]
- GitHub [direct]
- Open Collective [direct]
- Infraestructura de Pizarra [direct]
|
|