Skip to main content
Module

x/webview/mod.ts>Webview#bindRaw

🌐 Deno bindings for webview, a tiny library for creating web-based desktop GUIs
Go to Latest
method Webview.prototype.bindRaw
import { Webview } from "https://deno.land/x/webview@0.7.5/mod.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 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 arg pointer

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

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