-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: webview upgrades, webview docs, webview focus
- Loading branch information
Showing
5 changed files
with
131 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Webview | ||
|
||
This specific controller allows controlling the client-side webview instance for a given player. | ||
|
||
You can focus the webview, hide pages, or show pages with ease. | ||
|
||
```ts | ||
import { useWebview } from '@Server/player/webview.js'; | ||
|
||
const view = useWebview(player); | ||
|
||
// Emit directly into the webview, and recieve the event | ||
// in the webview with the 'useEvents' composable | ||
view.emit('someevent', 'hello world!'); | ||
|
||
// Show the cursor and focus the webview instance | ||
view.focus(); | ||
|
||
// Hide the cursor and unfocus the webview instance | ||
view.unfocus(); | ||
|
||
// Hide a specific page | ||
view.hide('Example'); | ||
|
||
// Show a specific page | ||
view.show('Example', 'page'); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters