pull/1686/head
parent
887cf39321
commit
182f08d221
|
@ -314,6 +314,18 @@ window.addEventListener('unhandledrejection', (event) => {
|
||||||
const message = typeof event.reason === 'string' ? event.reason : event.reason?.message ?? String(event.reason)
|
const message = typeof event.reason === 'string' ? event.reason : event.reason?.message ?? String(event.reason)
|
||||||
globalThis.__lx_init_error_handler__.sendError(message.replace(/^Error:\\s/, ''))
|
globalThis.__lx_init_error_handler__.sendError(message.replace(/^Error:\\s/, ''))
|
||||||
})
|
})
|
||||||
|
Object.defineProperty(window.document, 'getElementsByTagName', {
|
||||||
|
value: (name) => {
|
||||||
|
if (name == 'script') {
|
||||||
|
return [
|
||||||
|
Object.freeze({
|
||||||
|
innerText: lx.currentScriptInfo.rawScript,
|
||||||
|
}),
|
||||||
|
]
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
})
|
||||||
})()`)
|
})()`)
|
||||||
|
|
||||||
webFrame.executeJavaScript(userApi.script).catch(_ => _)
|
webFrame.executeJavaScript(userApi.script).catch(_ => _)
|
||||||
|
|
Loading…
Reference in New Issue