Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement webview IPC support #51

Merged
merged 2 commits into from
Sep 23, 2024
Merged

Implement webview IPC support #51

merged 2 commits into from
Sep 23, 2024

Conversation

zephraph
Copy link
Owner

Enables passing a message from the webview back to the host deno process.

using webview = createWebView({
  ipc: true,
  // ...
})

webview.on("ipc", ({ message }) => {
  console.log(message);
});

webview.on("started", () => {
  await webview.eval("window.ipc.postMessage('hello from the webview')")
});

@zephraph zephraph merged commit 6999db7 into main Sep 23, 2024
8 checks passed
@zephraph zephraph deleted the with-ipc branch September 23, 2024 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant