1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-04 05:10:05 +02:00

fix search window

This commit is contained in:
s2
2019-06-06 15:56:42 +02:00
parent c5f9b551ab
commit 1313cff86a
21 changed files with 1297 additions and 0 deletions

37
app/node_modules/electron-find/example2/outer.js generated vendored Normal file
View File

@@ -0,0 +1,37 @@
const { remote, ipcRenderer } = require('electron')
const { FindInPage } = require('../src/index.js')
let findInPage = null
const webview1 = document.querySelector('#webview1')
webview1.addEventListener('dom-ready', () => {
findInPage = new FindInPage(webview1.getWebContents())
ipcRenderer.on('on-find', (e, args) => {
findInPage.openFindWindow()
})
})
webview1.addEventListener('close', () => {
console.log('webview1 close', )
if (findInPage) {
findInPage.destroy()
findInPage = null
}
})
webview1.addEventListener('destroyed', () => {
console.log('webview1 destroyed', )
if (findInPage) {
findInPage.destroy()
findInPage = null
}
})
webview1.addEventListener('crashed', () => {
console.log('webview1 crashed', )
if (findInPage) {
findInPage.destroy()
findInPage = null
}
})
ipcRenderer.on('on-find', (e, args) => {
findInPage ? findInPage.openFindWindow() : ''
})