@fkn/lib
Type Aliases
Section titled “Type Aliases”AttachFrameOptions
Section titled “AttachFrameOptions”type AttachFrameOptions = object;Properties
Section titled “Properties”domains?
Section titled “domains?”optional domains?: string[];iframe
Section titled “iframe”iframe: HTMLIFrameElement;lockdown?
Section titled “lockdown?”optional lockdown?: boolean;syncCookies?
Section titled “syncCookies?”optional syncCookies?: boolean;BoxedVideoElement
Section titled “BoxedVideoElement”type BoxedVideoElement = BoxBaseType<typeof type> & object & object;Type Declaration
Section titled “Type Declaration”controller
Section titled “controller”controller: Capable;initialState
Section titled “initialState”initialState: VideoElementState;Type Declaration
Section titled “Type Declaration”[UnderlyingType]
Section titled “[UnderlyingType]”[UnderlyingType]: RemoteVideoElement;CookieDetails
Section titled “CookieDetails”type CookieDetails = object;Properties
Section titled “Properties”name: string;url: string;FetchInit
Section titled “FetchInit”type FetchInit = RequestInit & object;Type Declaration
Section titled “Type Declaration”reason?
Section titled “reason?”optional reason?: string;type Frame = FrameLocator<LocatorModules> & object;Type Declaration
Section titled “Type Declaration”goto()
Section titled “goto()”goto(url, options?): Promise<void>;Parameters
Section titled “Parameters”string
options?
Section titled “options?”Returns
Section titled “Returns”Promise<void>
url(): string;Returns
Section titled “Returns”string
FrameBackend
Section titled “FrameBackend”type FrameBackend = object;Properties
Section titled “Properties”executor
Section titled “executor”executor: Executor;optional gate?: Gate;Methods
Section titled “Methods”goto()
Section titled “goto()”goto(url, options?): Promise<void>;Parameters
Section titled “Parameters”string
options?
Section titled “options?”Returns
Section titled “Returns”Promise<void>
url(): string;Returns
Section titled “Returns”string
GotoOptions
Section titled “GotoOptions”type GotoOptions = object;Properties
Section titled “Properties”domains?
Section titled “domains?”optional domains?: string[];waitUntil?
Section titled “waitUntil?”optional waitUntil?: "documentstart" | "load";HeaderOperation
Section titled “HeaderOperation”type HeaderOperation = object;Properties
Section titled “Properties”header
Section titled “header”header: string;operation
Section titled “operation”operation: "set" | "remove";value?
Section titled “value?”optional value?: string;Locator
Section titled “Locator”type Locator = FrameLocatorElements<LocatorModules>;PermissionGrant
Section titled “PermissionGrant”type PermissionGrant = object;Properties
Section titled “Properties”allow: boolean;key: PermissionScope;scope: string;PermissionRequest
Section titled “PermissionRequest”type PermissionRequest = object;Properties
Section titled “Properties”key: PermissionScope;reason?
Section titled “reason?”optional reason?: string;scope?
Section titled “scope?”optional scope?: string;ProxyFetchRequest
Section titled “ProxyFetchRequest”type ProxyFetchRequest = object;Properties
Section titled “Properties”body: ArrayBuffer | null;credentials
Section titled “credentials”credentials: "include" | "omit";headers
Section titled “headers”headers: [string, string][];method
Section titled “method”method: string;reason?
Section titled “reason?”optional reason?: string;redirect
Section titled “redirect”redirect: RequestRedirect;signal?
Section titled “signal?”optional signal?: AbortSignal;unsafeHeaders?
Section titled “unsafeHeaders?”optional unsafeHeaders?: [string, string][];url: string;RemoteVideoElement
Section titled “RemoteVideoElement”type RemoteVideoElement = EventTarget & object;Type Declaration
Section titled “Type Declaration”autoplay
Section titled “autoplay”autoplay: boolean;buffered
Section titled “buffered”readonly buffered: TimeRanges;currentSrc
Section titled “currentSrc”readonly currentSrc: string;currentTime
Section titled “currentTime”currentTime: number;disableRemotePlayback
Section titled “disableRemotePlayback”disableRemotePlayback: boolean;duration
Section titled “duration”readonly duration: number;readonly ended: boolean;readonly error: MediaError | null;HAVE_ENOUGH_DATA
Section titled “HAVE_ENOUGH_DATA”readonly HAVE_ENOUGH_DATA: 4;HAVE_FUTURE_DATA
Section titled “HAVE_FUTURE_DATA”readonly HAVE_FUTURE_DATA: 3;loop: boolean;muted: boolean;paused
Section titled “paused”readonly paused: boolean;playbackRate
Section titled “playbackRate”playbackRate: number;poster
Section titled “poster”poster: string;preload
Section titled “preload”preload: string;readyState
Section titled “readyState”readonly readyState: number;seekable
Section titled “seekable”readonly seekable: TimeRanges;seeking
Section titled “seeking”readonly seeking: boolean;src: string;volume
Section titled “volume”volume: number;exitPictureInPicture()
Section titled “exitPictureInPicture()”exitPictureInPicture(): Promise<void>;Returns
Section titled “Returns”Promise<void>
load()
Section titled “load()”load(): void;Returns
Section titled “Returns”void
pause()
Section titled “pause()”pause(): void;Returns
Section titled “Returns”void
play()
Section titled “play()”play(): Promise<void>;Returns
Section titled “Returns”Promise<void>
requestPictureInPicture()
Section titled “requestPictureInPicture()”requestPictureInPicture(): Promise<void>;Returns
Section titled “Returns”Promise<void>
RequestHeaderRule
Section titled “RequestHeaderRule”type RequestHeaderRule = object;Properties
Section titled “Properties”domains
Section titled “domains”domains: string[];reason?
Section titled “reason?”optional reason?: string;requestHeaders
Section titled “requestHeaders”requestHeaders: HeaderOperation[];SiteCookie
Section titled “SiteCookie”type SiteCookie = object;Properties
Section titled “Properties”name: string;value: string;VideoElementState
Section titled “VideoElementState”type VideoElementState = object;Properties
Section titled “Properties”autoplay
Section titled “autoplay”autoplay: boolean;buffered
Section titled “buffered”buffered: TimeRangesTuple;currentSrc
Section titled “currentSrc”currentSrc: string;currentTime
Section titled “currentTime”currentTime: number;disableRemotePlayback
Section titled “disableRemotePlayback”disableRemotePlayback: boolean;duration
Section titled “duration”duration: number;ended: boolean;error: | { code: number; message: string;} | null;loop: boolean;muted: boolean;paused
Section titled “paused”paused: boolean;playbackRate
Section titled “playbackRate”playbackRate: number;poster
Section titled “poster”poster: string;preload
Section titled “preload”preload: string;readyState
Section titled “readyState”readyState: number;seekable
Section titled “seekable”seekable: TimeRangesTuple;seeking
Section titled “seeking”seeking: boolean;src: string;volume
Section titled “volume”volume: number;Variables
Section titled “Variables”assertAttachableFrameUrl
Section titled “assertAttachableFrameUrl”const assertAttachableFrameUrl: (raw) => void;Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
assertFetchableUrl
Section titled “assertFetchableUrl”const assertFetchableUrl: (raw) => void;Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
assertForgeableHeaders
Section titled “assertForgeableHeaders”const assertForgeableHeaders: (unsafeHeaders) => void;Parameters
Section titled “Parameters”unsafeHeaders
Section titled “unsafeHeaders”[string, string][] | undefined
Returns
Section titled “Returns”void
assertLockdownApplicable
Section titled “assertLockdownApplicable”const assertLockdownApplicable: ({ src, domains, lockdown }) => void;Parameters
Section titled “Parameters”{ src, domains, lockdown }
Section titled “{ src, domains, lockdown }”domains
Section titled “domains”string[]
lockdown
Section titled “lockdown”boolean
string
Returns
Section titled “Returns”void
assertOneCookieIdentity
Section titled “assertOneCookieIdentity”const assertOneCookieIdentity: (unsafeHeaders, credentials) => void;Parameters
Section titled “Parameters”unsafeHeaders
Section titled “unsafeHeaders”[string, string][] | undefined
credentials
Section titled “credentials”"include" | "omit"
Returns
Section titled “Returns”void
ATTACH_FRAME_EVENT_KEY
Section titled “ATTACH_FRAME_EVENT_KEY”const ATTACH_FRAME_EVENT_KEY: "FKN_WEB_EXTENSION_ATTACH_FRAME_EVENT_KEY" = "FKN_WEB_EXTENSION_ATTACH_FRAME_EVENT_KEY";attachFramePermission
Section titled “attachFramePermission”const attachFramePermission: object;Type Declaration
Section titled “Type Declaration”category
Section titled “category”readonly category: "embed";description
Section titled “description”readonly description: "Lets the app embed external pages directly inside its own view.";readonly scope: "embed.iframe";severity
Section titled “severity”readonly severity: 0;readonly title: "Load another website inside this app";const box: <T, T2>(value, context) => BoxedVideoElement;Type Parameters
Section titled “Type Parameters”T extends RemoteVideoElement
T2 extends RevivableContext
Parameters
Section titled “Parameters”T
context
Section titled “context”T2
Returns
Section titled “Returns”cookies
Section titled “cookies”const cookies: object;Type Declaration
Section titled “Type Declaration”get: (details) => Promise<SiteCookie | null>;Parameters
Section titled “Parameters”details
Section titled “details”Returns
Section titled “Returns”Promise<SiteCookie | null>
createFrame
Section titled “createFrame”const createFrame: (backend) => Frame;Parameters
Section titled “Parameters”backend
Section titled “backend”Returns
Section titled “Returns”createVideoElementHandle
Section titled “createVideoElementHandle”const createVideoElementHandle: (element) => RemoteVideoElement;Parameters
Section titled “Parameters”element
Section titled “element”HTMLVideoElement
Returns
Section titled “Returns”fetchCredentialedPermission
Section titled “fetchCredentialedPermission”const fetchCredentialedPermission: object;Type Declaration
Section titled “Type Declaration”category
Section titled “category”readonly category: "network";description
Section titled “description”readonly description: "Lets the app fetch other sites using your logged-in session cookies, so it can read data only you should see.";readonly scope: "network.fetchCredentialed";severity
Section titled “severity”readonly severity: 3;readonly title: "Fetch from other sites, signed in as you";unsafe
Section titled “unsafe”readonly unsafe: true;fetchLocalPermission
Section titled “fetchLocalPermission”const fetchLocalPermission: object;Type Declaration
Section titled “Type Declaration”category
Section titled “category”readonly category: "network";description
Section titled “description”readonly description: "Lets the app reach devices and services on your home or work network, which websites normally cannot touch.";readonly scope: "network.fetchLocal";severity
Section titled “severity”readonly severity: 3;readonly title: "Access devices on your local network";unsafe
Section titled “unsafe”readonly unsafe: true;fetchPermission
Section titled “fetchPermission”const fetchPermission: object;Type Declaration
Section titled “Type Declaration”category
Section titled “category”readonly category: "network";description
Section titled “description”readonly description: "Lets the app download public data from other websites directly, past the usual cross-origin limits.";readonly scope: "network.fetch";severity
Section titled “severity”readonly severity: 0;readonly title: "Fetch data from other sites";FORGEABLE_HEADERS
Section titled “FORGEABLE_HEADERS”const FORGEABLE_HEADERS: string[];gotoPermission
Section titled “gotoPermission”const gotoPermission: object;Type Declaration
Section titled “Type Declaration”category
Section titled “category”readonly category: "embed";description
Section titled “description”readonly description: "Lets the app navigate to another site without leaving its window.";readonly scope: "embed.open";severity
Section titled “severity”readonly severity: 0;readonly title: "Open a website inside this app";handleRevivableModules
Section titled “handleRevivableModules”const handleRevivableModules: (defaults) => readonly [typeof videoElement, __module, __module, __module, __module, __module, __module, __module, __module, __module, __module, __module, __module, __module, __module, __module, __module, __module, __module, __module, __module, __module, { box: (value, context) => BoxedNonFiniteNumber | number; isType: (value) => value is number; revive: (value, _context) => number; type: "nonFiniteNumber";}, { box: (value, context) => BoxedUndefined | undefined; isType: (value) => value is undefined; revive: (_value, _context) => undefined; type: "undefined";}, { box: (value, _context) => Clonable; capableOnly: true; isType: (value) => value is Clonable; revive: (value, _context) => Clonable; type: "clonable";}, { box: (value, _context) => Transferable; capableOnly: true; isType: (value) => value is Transferable; revive: (value, _context) => Transferable; type: "transferable";}, { box: (value, context) => Blob; capableOnly: true; isType: (value) => value is Blob; revive: (value, _context) => Blob; type: "blob";}, __module, { box: (_value, _context) => BoxedUnclonable; isType: (value) => value is never; revive: (_value, _context) => Record<string, never>; type: "unclonable";}];Parameters
Section titled “Parameters”defaults
Section titled “defaults”DefaultRevivableModules
Returns
Section titled “Returns”readonly [typeof videoElement, __module, __module, __module, __module, __module, __module, __module, __module, __module, __module, __module, __module, __module, __module, __module, __module, __module, __module, __module, __module, __module, {
box: (value, context) => BoxedNonFiniteNumber | number;
isType: (value) => value is number;
revive: (value, _context) => number;
type: "nonFiniteNumber";
}, {
box: (value, context) => BoxedUndefined | undefined;
isType: (value) => value is undefined;
revive: (_value, _context) => undefined;
type: "undefined";
}, {
box: (value, _context) => Clonable;
capableOnly: true;
isType: (value) => value is Clonable;
revive: (value, _context) => Clonable;
type: "clonable";
}, {
box: (value, _context) => Transferable;
capableOnly: true;
isType: (value) => value is Transferable;
revive: (value, _context) => Transferable;
type: "transferable";
}, {
box: (value, context) => Blob;
capableOnly: true;
isType: (value) => value is Blob;
revive: (value, _context) => Blob;
type: "blob";
}, __module, {
box: (_value, _context) => BoxedUnclonable;
isType: (value) => value is never;
revive: (_value, _context) => Record<string, never>;
type: "unclonable";
}]
hasForgedCookie
Section titled “hasForgedCookie”const hasForgedCookie: (unsafeHeaders) => boolean;Parameters
Section titled “Parameters”unsafeHeaders
Section titled “unsafeHeaders”[string, string][] | undefined
Returns
Section titled “Returns”boolean
isBlockedFetchUrl
Section titled “isBlockedFetchUrl”const isBlockedFetchUrl: (raw) => boolean;Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
isBlockedFrameUrl
Section titled “isBlockedFrameUrl”const isBlockedFrameUrl: (raw) => boolean;Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
isExtensionExposed
Section titled “isExtensionExposed”const isExtensionExposed: () => boolean;Returns
Section titled “Returns”boolean
isLocalNetworkUrl
Section titled “isLocalNetworkUrl”const isLocalNetworkUrl: (raw) => boolean;Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
isType
Section titled “isType”const isType: (value) => value is RemoteVideoElement;Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”value is RemoteVideoElement
modifyRequestHeadersPermission
Section titled “modifyRequestHeadersPermission”const modifyRequestHeadersPermission: object;Type Declaration
Section titled “Type Declaration”category
Section titled “category”readonly category: "network";description
Section titled “description”readonly description: "Lets the app set or remove headers (like Origin and Referer) on this page’s own requests to the listed sites.";readonly scope: "network.modifyRequestHeaders";severity
Section titled “severity”readonly severity: 2;readonly title: "Rewrite request headers to other sites";unsafe
Section titled “unsafe”readonly unsafe: true;permissions
Section titled “permissions”const permissions: object;Type Declaration
Section titled “Type Declaration”request
Section titled “request”request: (requests) => Promise<PermissionGrant[]>;Parameters
Section titled “Parameters”requests
Section titled “requests”Returns
Section titled “Returns”readCookiePermission
Section titled “readCookiePermission”const readCookiePermission: object;Type Declaration
Section titled “Type Declaration”category
Section titled “category”readonly category: "network";description
Section titled “description”readonly description: "Lets the app read a named cookie from another site, which can include the login token only that site should see.";readonly scope: "network.readCookie";severity
Section titled “severity”readonly severity: 3;readonly title: "Read a site’s cookie";unsafe
Section titled “unsafe”readonly unsafe: true;removeRequestHeaderRule
Section titled “removeRequestHeaderRule”const removeRequestHeaderRule: (ruleId) => Promise<void>;Parameters
Section titled “Parameters”ruleId
Section titled “ruleId”number
Returns
Section titled “Returns”Promise<void>
revive
Section titled “revive”const revive: <T, T2>(value, context) => T[UnderlyingType];Type Parameters
Section titled “Type Parameters”T extends BoxedVideoElement
T2 extends RevivableContext
Parameters
Section titled “Parameters”T
context
Section titled “context”T2
Returns
Section titled “Returns”T[UnderlyingType]
setMissingExtensionHandler
Section titled “setMissingExtensionHandler”const setMissingExtensionHandler: (handler) => void;Parameters
Section titled “Parameters”handler
Section titled “handler”MissingExtensionHandler | null
Returns
Section titled “Returns”void
setRequestHeaderRule
Section titled “setRequestHeaderRule”const setRequestHeaderRule: (rule) => Promise<{ ruleId: number;}>;Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<{
ruleId: number;
}>
const type: "videoElement";waitForExtensionExposure
Section titled “waitForExtensionExposure”const waitForExtensionExposure: (timeout?) => Promise<void>;Parameters
Section titled “Parameters”timeout?
Section titled “timeout?”number
Returns
Section titled “Returns”Promise<void>
Functions
Section titled “Functions”attachFrame()
Section titled “attachFrame()”function attachFrame(options): Promise<Frame>;Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”connect()
Section titled “connect()”function connect(): Promise<boolean>;Returns
Section titled “Returns”Promise<boolean>
connectButtonUrl()
Section titled “connectButtonUrl()”function connectButtonUrl(origin?): string;Parameters
Section titled “Parameters”origin?
Section titled “origin?”string
Returns
Section titled “Returns”string
fetch()
Section titled “fetch()”function fetch(input, init?): Promise<Response>;Parameters
Section titled “Parameters”URL | RequestInfo
RequestInit & object
Returns
Section titled “Returns”Promise<Response>
promptInstall()
Section titled “promptInstall()”function promptInstall(reason?): Promise<boolean>;Parameters
Section titled “Parameters”reason?
Section titled “reason?”string
Returns
Section titled “Returns”Promise<boolean>
promptRelay()
Section titled “promptRelay()”function promptRelay(): Promise<string | null>;Returns
Section titled “Returns”Promise<string | null>
relayWorker()
Section titled “relayWorker()”function relayWorker(worker, options?): void;Parameters
Section titled “Parameters”worker
Section titled “worker”Worker
options?
Section titled “options?”originA?
Section titled “originA?”string
originB?
Section titled “originB?”string
unregisterSignal?
Section titled “unregisterSignal?”AbortSignal
Returns
Section titled “Returns”void
References
Section titled “References”account
Section titled “account”Re-exports account
Re-exports cloud
desktop
Section titled “desktop”Re-exports desktop
Re-exports dgram
Re-exports dns
extension
Section titled “extension”Re-exports extension
Re-exports fs
Re-exports http
Re-exports net
Re-exports opfs
packages
Section titled “packages”Re-exports packages