Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deno/cli/tsc/dts/lib.deno.unstable.d.ts>Deno.UnsafeWindowSurface

A modern runtime for JavaScript and TypeScript.
Latest
class Deno.UnsafeWindowSurface
import { Deno } from "https://deno.land/x/deno@v1.41.0/cli/tsc/dts/lib.deno.unstable.d.ts";
const { UnsafeWindowSurface } = Deno;

UNSTABLE: New API, yet to be vetted.

Creates a presentable WebGPU surface from given window and display handles.

The parameters correspond to the table below:

system winHandle displayHandle
"cocoa" (macOS) NSView* -
"win32" (Windows) HWND HINSTANCE
"x11" (Linux) Xlib Window Xlib Display*

Constructors

new
UnsafeWindowSurface(
system: "cocoa" | "win32" | "x11",
windowHandle: Deno.PointerValue<unknown>,
displayHandle: Deno.PointerValue<unknown>,
)

Methods

getContext(context: "webgpu"): GPUCanvasContext
present(): void