-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d984de
commit e706cf8
Showing
13 changed files
with
445 additions
and
436 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
[package] | ||
name = "deno_webview" | ||
version = "0.3.0" | ||
version = "0.3.1" | ||
authors = ["Elias Sjögreen <[email protected]>"] | ||
edition = "2018" | ||
|
||
[lib] | ||
crate-type = ["cdylib"] | ||
|
||
[dependencies] | ||
deno_core = "0.37.1" | ||
deno_core = "0.38.0" | ||
webview-sys = "0.5.0" | ||
serde = { version = "1.0", features = ["derive"] } | ||
serde_json = "1.0" | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import { WebView } from "../mod.ts"; | ||
|
||
await new WebView({ | ||
title: "Local deno_webview example", | ||
url: `data:text/html, | ||
<html> | ||
<body> | ||
<h1>Hello from deno</h1> | ||
</body> | ||
</html> | ||
`, | ||
width: 800, | ||
height: 600, | ||
resizable: true, | ||
debug: true, | ||
frameless: false | ||
}).run(); | ||
import { WebView } from "../mod.ts"; | ||
|
||
await new WebView({ | ||
title: "Local deno_webview example", | ||
url: `data:text/html, | ||
<html> | ||
<body> | ||
<h1>Hello from deno</h1> | ||
</body> | ||
</html> | ||
`, | ||
width: 800, | ||
height: 600, | ||
resizable: true, | ||
debug: true, | ||
frameless: false, | ||
}).run(); |
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 |
---|---|---|
@@ -1,35 +1,35 @@ | ||
import { WebView } from "../mod.ts"; | ||
|
||
const webview1 = new WebView({ | ||
title: "Multiple deno_webview example", | ||
url: `data:text/html, | ||
<html> | ||
<body> | ||
<h1>1</h1> | ||
</body> | ||
</html> | ||
`, | ||
width: 800, | ||
height: 600, | ||
resizable: true, | ||
debug: true, | ||
frameless: false | ||
}); | ||
|
||
const webview2 = new WebView({ | ||
title: "Multiple deno_webview example", | ||
url: `data:text/html, | ||
<html> | ||
<body> | ||
<h1>2</h1> | ||
</body> | ||
</html> | ||
`, | ||
width: 800, | ||
height: 600, | ||
resizable: true, | ||
debug: true, | ||
frameless: false | ||
}); | ||
|
||
await Promise.all([webview1.run(), webview2.run()]); | ||
import { WebView } from "../mod.ts"; | ||
|
||
const webview1 = new WebView({ | ||
title: "Multiple deno_webview example", | ||
url: `data:text/html, | ||
<html> | ||
<body> | ||
<h1>1</h1> | ||
</body> | ||
</html> | ||
`, | ||
width: 800, | ||
height: 600, | ||
resizable: true, | ||
debug: true, | ||
frameless: false, | ||
}); | ||
|
||
const webview2 = new WebView({ | ||
title: "Multiple deno_webview example", | ||
url: `data:text/html, | ||
<html> | ||
<body> | ||
<h1>2</h1> | ||
</body> | ||
</html> | ||
`, | ||
width: 800, | ||
height: 600, | ||
resizable: true, | ||
debug: true, | ||
frameless: false, | ||
}); | ||
|
||
await Promise.all([webview1.run(), webview2.run()]); |
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { WebView } from "../mod.ts"; | ||
|
||
await new WebView({ | ||
title: "Remote deno_webview example", | ||
url: `https://en.wikipedia.org/wiki/Main_Page`, | ||
width: 800, | ||
height: 600, | ||
resizable: true, | ||
debug: true, | ||
frameless: false | ||
}).run(); | ||
import { WebView } from "../mod.ts"; | ||
|
||
await new WebView({ | ||
title: "Remote deno_webview example", | ||
url: `https://en.wikipedia.org/wiki/Main_Page`, | ||
width: 800, | ||
height: 600, | ||
resizable: true, | ||
debug: true, | ||
frameless: false, | ||
}).run(); |
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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import { WebView } from "../mod.ts"; | ||
|
||
await new WebView({ | ||
title: "User agent deno_webview example", | ||
url: `data:text/html, | ||
<html> | ||
<body> | ||
<h1 id="h1">2 Nav</h1> | ||
<script>document.body.innerHTML = window.navigator.userAgent;</script> | ||
</body> | ||
</html> | ||
`, | ||
width: 800, | ||
height: 600, | ||
resizable: true, | ||
debug: false, | ||
frameless: false | ||
}).run(); | ||
import { WebView } from "../mod.ts"; | ||
|
||
await new WebView({ | ||
title: "User agent deno_webview example", | ||
url: `data:text/html, | ||
<html> | ||
<body> | ||
<h1 id="h1">2 Nav</h1> | ||
<script>document.body.innerHTML = window.navigator.userAgent;</script> | ||
</body> | ||
</html> | ||
`, | ||
width: 800, | ||
height: 600, | ||
resizable: true, | ||
debug: false, | ||
frameless: false, | ||
}).run(); |
Oops, something went wrong.