TheoXiong / electron-find

:mag: Find all matches for the text in the web page

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can not work on "electron": "17.1.2"

qinzitong opened this issue · comments

commented

//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

commented

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])
}