steal focus on deep-link click

This commit is contained in:
dmc
2024-03-07 02:49:21 +01:00
parent f7bb6ae06e
commit 9c1d16c5bb
2 changed files with 1 additions and 4 deletions

View File

@@ -74,7 +74,7 @@ customElements.define('app-router', class AppRouter extends HTMLElement {
console.log('load', page)
this.load(page).catch(console.error)
Pear.wakeups(({ data }) => {
Pear.Window.self.focus().catch(console.error)
Pear.Window.self.focus({ steal: true }).catch(console.error)
const page = '/' + (data || '')
this.load(page).catch(console.error)
})

View File

@@ -405,9 +405,6 @@ The `listener` function is called for every incoming wakeup with a `wakeup` obje
Also returns a [`streamx`](https://github.com/mafintosh/streamx) `Readable`) stream.
### `const win = new Pear.Window(entry <String>, options <Object>)`
Desktop Applications only.