mirror of
https://github.com/streamwall/streamwall.git
synced 2026-01-31 09:22:49 -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)
|
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
|
const machine = viewStateMachine
|
||||||
.withContext({
|
.withContext({
|
||||||
...viewStateMachine.context,
|
...viewStateMachine.context,
|
||||||
|
|||||||
Reference in New Issue
Block a user