github.com/primecitizens/pcz/std@v0.2.1/plat/js/webext/incognito/bindings/ffi_bindings.ts (about) 1 import { importModule, Application, heap, Pointer } from "@ffi"; 2 3 importModule("plat/js/webext/incognito", (A: Application) => { 4 const WEBEXT = typeof globalThis.browser === "undefined" ? globalThis.chrome : globalThis.browser; 5 6 return { 7 "constof_IncognitoMode": (ref: heap.Ref<string>): number => { 8 const idx = ["split", "spanning", "not_allowed"].indexOf(A.H.get(ref)); 9 return idx < 0 ? 0 : idx + 1; 10 }, 11 }; 12 });