feat(window): refactor and improvements (#426)

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
This commit is contained in:
Amr Bashir
2023-08-07 13:20:17 -03:00
committed by GitHub
co-authored by Lucas Nogueira
parent 5b3210c224
commit 84133b57b8
8 changed files with 323 additions and 330 deletions
+5 -3
View File
@@ -60,18 +60,20 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import { appWindow, WebviewWindow } from "@tauri-apps/plugin-window";
import { getCurrent, Window } from "@tauri-apps/plugin-window";
const appWindow = getCurrent();
// manipulating this window
await appWindow.setResizable(false);
// Creating new windows:
// loading embedded asset:
const webview = new WebviewWindow("theUniqueLabel", {
const webview = new Window("theUniqueLabel", {
url: "path/to/page.html",
});
// alternatively, load a remote URL:
const webview = new WebviewWindow("theUniqueLabel", {
const webview = new Window("theUniqueLabel", {
url: "https://github.com/tauri-apps/tauri",
});
```
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long