Slightly rewrite <webview> tag tests (#13122)
This commit is contained in:
parent
1eddb5cf98
commit
0d5e98a201
3 changed files with 391 additions and 316 deletions
|
@ -13,6 +13,9 @@
|
||||||
const {ipcRenderer} = require('electron')
|
const {ipcRenderer} = require('electron')
|
||||||
|
|
||||||
const webview = document.getElementById('webview')
|
const webview = document.getElementById('webview')
|
||||||
|
webview.addEventListener('did-finish-load', () => {
|
||||||
|
ipcRenderer.send('webview-loaded')
|
||||||
|
}, {once: true})
|
||||||
webview.addEventListener('resize', event => {
|
webview.addEventListener('resize', event => {
|
||||||
ipcRenderer.send('webview-element-resize', event.newWidth, event.newHeight)
|
ipcRenderer.send('webview-element-resize', event.newWidth, event.newHeight)
|
||||||
}, false)
|
}, false)
|
||||||
|
|
|
@ -13,6 +13,9 @@
|
||||||
const {ipcRenderer} = require('electron')
|
const {ipcRenderer} = require('electron')
|
||||||
|
|
||||||
const webview = document.getElementById('webview')
|
const webview = document.getElementById('webview')
|
||||||
|
webview.addEventListener('did-finish-load', () => {
|
||||||
|
ipcRenderer.send('webview-loaded')
|
||||||
|
}, {once: true})
|
||||||
webview.addEventListener('resize', event => {
|
webview.addEventListener('resize', event => {
|
||||||
ipcRenderer.send('webview-element-resize', event.newWidth, event.newHeight)
|
ipcRenderer.send('webview-element-resize', event.newWidth, event.newHeight)
|
||||||
}, false)
|
}, false)
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue