can not work on "electron": "17.1.2"
qinzitong opened this issue · comments
//preload.js
let findInPage = new FindInPage(require('@electron/remote').getCurrentWebContents(), {
preload: true,
offsetTop: 6,
offsetRight: 10
})
error:
TypeError: Cannot read properties of null (reading 'appendChild')
at FindInPage.appendElement
findInPage.js
改为这样就行了:
function appendElement () {
this[findBox].appendChild(this[findInput])
this[findBox].appendChild(this[findMatches])
this[findBox].appendChild(this[findCase])
this[findBox].appendChild(this[findBack])
this[findBox].appendChild(this[findForward])
this[findBox].appendChild(this[findClose])
this.parentElement.appendChild(this[findBox])
}