mirror of
https://github.com/streamwall/streamwall.git
synced 2026-01-27 07:22:50 -05:00
Prevent views from navigating away from the current page
This commit is contained in:
@@ -135,6 +135,12 @@ export default class StreamWindow extends EventEmitter {
|
||||
})
|
||||
view.setBackgroundColor(backgroundColor)
|
||||
|
||||
// Prevent view pages from navigating away from the specified URL.
|
||||
view.webContents.on('will-navigate', (ev) => {
|
||||
console.log(ev)
|
||||
ev.preventDefault()
|
||||
})
|
||||
|
||||
const machine = viewStateMachine
|
||||
.withContext({
|
||||
...viewStateMachine.context,
|
||||
|
||||
Reference in New Issue
Block a user