Frame API
The Frame API lets you manage background frames — hidden iframes running in the background of your extension.
Frames are useful for running isolated scripts, maintaining hidden state, or hosting background UI such as invisible canvases or offscreen views.
epos.frame.open
Opens (or reuses) a background frame.
Each frame has a unique name, and if a frame with the same name already exists, it won’t be created again.
epos.frame.open(name: string, url: string, attributes?: Record<string, unknown>): Promise<void>await epos.frame.open('preview', 'frame:./preview.html')epos.frame.close
Closes a background frame by name.
Usage
epos.frame.close(name: string): Promise<void>Example
await epos.frame.close('preview')epos.frame.exists
Checks whether a background frame with the given name currently exists.
Usage
epos.frame.exists(name: string): Promise<boolean>Example
if (await epos.frame.exists('preview')) {
console.log('Preview frame is active')
}epos.frame.list
Returns a list of all currently open background frames, including their names and URLs.
Usage
epos.frame.list(): Promise<{ name: string; url: string }[]>Example
const frames = await epos.frame.list()
console.table(frames)Frames opened through this API stay active in the background until explicitly closed. They can communicate with other parts of your extension using the Bus API.