mirror of
https://github.com/Drop-OSS/wry-cef.git
synced 2026-01-30 20:55:24 +01:00
* Refactor new method entry point to rwh * Update doc and add change file * Fix mac and ios compile error * Add new_as_child * Add rhw_04, 05 06 flags * Update android port * Remove winit CI * Fix android bindings * windows implementation * Update Cargo.toml * Fix macOS and iOS * Fix Android * fix is_child on WkWebView * x11 impl * expose `new_gtk` * fix winit-gtk version * remove undecorated resizing handling * implement set_position and set_size for child gtk in x11 * fix macos * more fixes * one more time * unreachable * update actions * fix windows * some clippy * Add documentation and fix clippy * Fix windows clippy error * Fix android biuld * Fix documentation test * Fix android again * Reduce clippy noise * use rc? * refine some documentation, add set_visible * fix set_visible * impl set_visible on Windows * fix doctests * more set_visible fixes * fix windows * unsafe * fix set size for child webviews * fix initial visibility with new_gtk * refine examples * fix wpgu example * fix examples on windows and macos * use a better workaround * make set_size work on x11 * Fix size in multiwebview example * Add visible method on macOS and iOS * remvoe `tao` from android backend and update documentation * fix winit example * Add new_as_content_view on macOS * allow using raw-window-handle v0.5 [skip ci] * change trait name [skip ci] * fix linux impl [skip ci] * fix android build [skip ci] * fix windows build * fix(macos): do not autoresize on child webview [skip ci] * fix macos coordinates [skip ci] * fix example [skip ci] * fixed child on macos [skip ci] * fix docs typos [skip ci] * fix webview position when it's not a child [skip ci] * replace new_as_content_view with new_as_subview * with_as_subview instead of constructor [skip ci] * fix position/size when as_subview is true * lint & fmt * Fix ios build * Fix cargo test * Fix mac build * Update macOS contrusctors * cargo fmt * impl drop on Windows * fix child transparency on Windows (still needs PRs in tao and winit) * fix winit usage in the examples, use rwh_05 only for now * fix tests * add webview.focus * fix dropping on Linux * chore clean examples * implement focus on Linux * macos focus --------- Co-authored-by: amrbashir <amr.bashir2015@gmail.com> Co-authored-by: Lucas Nogueira <lucas@tauri.app> Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
23 lines
843 B
JavaScript
23 lines
843 B
JavaScript
// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
// SPDX-License-Identifier: MIT
|
|
if (window.location.pathname.startsWith("/page2")) {
|
|
console.log("hello from javascript in page2");
|
|
} else {
|
|
console.log("hello from javascript in page1");
|
|
|
|
if (typeof WebAssembly.instantiateStreaming !== "undefined") {
|
|
WebAssembly.instantiateStreaming(fetch("/wasm.wasm")).then((wasm) => {
|
|
console.log(wasm.instance.exports.main()); // should log 42
|
|
});
|
|
} else {
|
|
// Older WKWebView may not support `WebAssembly.instantiateStreaming` yet.
|
|
fetch("/wasm.wasm")
|
|
.then((response) => response.arrayBuffer())
|
|
.then((bytes) => WebAssembly.instantiate(bytes))
|
|
.then((wasm) => {
|
|
console.log(wasm.instance.exports.main()); // should log 42
|
|
});
|
|
}
|
|
}
|