Module

x/webview/src/webview.ts>Webview#bindRaw

🌐 Deno bindings for webview, a tiny library for creating web-based desktop GUIs
Latest
method Webview.prototype.bindRaw
import { Webview } from "https://dotland.deno.dev/x/webview@0.8.1/src/webview.ts";

Binds a callback so that it will appear in the webview with the given name as a global async JavaScript function. Callback receives a seq and req value. The seq parameter is an identifier for using {@link Webview.return} to return a value while the req parameter is a string of an JSON array representing the arguments passed from the JavaScript function call.

Parameters

name: string

The name of the bound function

callback: (
seq: string,
req: string,
arg: Deno.PointerValue | null,
) => void

A callback which takes two strings as parameters: seq and req and the passed {@link arg} pointer

optional
arg: Deno.PointerValue | null = [UNSUPPORTED]

A pointer which is going to be passed to the callback once called