Skip to content

Action reference ​

Generated from packages/protocol/src/schemas.ts by pnpm docs:actions. Don't edit by hand.

Every action is called as ext.<group>.<name>(input, { target?, timeoutMs?, signal? }), or ext.call("group.name", input, options). Inputs are checked by the extension. Wrong input comes back as INVALID_INPUT.

A locator finds elements: { ref?, role?, name?, text?, testId?, css?, nth?, exact? }. Give at least one of ref, role, text, testId or css; fields combine. A target picks the tab: { tab?: "active" | tabId | { urlMatch }, frame?: "top" | frameId }. The default is the active tab of the controller's window.

Contents ​

runtime ​

runtime.ping ​

Check the connection.

Runs in extension background.

Input

No fields.

Output

FieldTypeRequiredNotes
pongtrueyes
tsnumberyes

runtime.describe ​

List the actions this controller may call, with JSON schemas for their input and output. Includes host-defined actions.

Runs in extension background.

Input

FieldTypeRequiredNotes
actionsstring[]

Output

FieldTypeRequiredNotes
host{ id: string; name?: string; version?: string }yes
actions({ name: string; description: string; where: "background" | "content" | "bridge"; version: number; input: Record<string, unknown>; output: Record<string, unknown> })[]yes

run ​

run.sequence ​

Run several actions in order in one round trip. Steps are plain data: no conditions or expressions. Each step is checked like a separate call.

Runs in extension background. Default timeout 120 s.

Input

FieldTypeRequiredNotes
steps({ action: string; input?: unknown; target?: { tab?: "active" | number | { urlMatch: string }; frame?: "top" | number | { urlMatch: string } }; timeoutMs?: number; onError?: "stop" | "continue"; pauseMs?: number })[]yes
onError"stop" | "continue"default "stop"

Output

FieldTypeRequiredNotes
completednumberyes
okbooleanyes
results({ ok: true; action: string; output: unknown } | { ok: false; action: string; error: { code: string; message: string } })[]yes

tabs ​

tabs.list ​

List open tabs.

Runs in extension background.

Input

FieldTypeRequiredNotes
currentWindowboolean
urlMatchstring

Output

FieldTypeRequiredNotes
tabs{ id: number; windowId: number; url: string; title: string; active: boolean; status: string; discarded?: boolean; autoDiscardable?: boolean }[]yes

tabs.open ​

Open a URL in a new tab.

Runs in extension background. Default timeout 30 s.

Input

FieldTypeRequiredNotes
urlstringyes
activebooleandefault true
waitForLoadbooleandefault true

Output

FieldTypeRequiredNotes
idnumberyes
windowIdnumberyes
urlstringyes
titlestringyes
activebooleanyes
statusstringyes
discardedboolean
autoDiscardableboolean

tabs.close ​

Close a tab.

Runs in extension background.

Input

FieldTypeRequiredNotes
tabIdnumberyes

Output

No fields.

tabs.activate ​

Focus a tab.

Runs in extension background.

Input

FieldTypeRequiredNotes
tabIdnumberyes

Output

FieldTypeRequiredNotes
idnumberyes
windowIdnumberyes
urlstringyes
titlestringyes
activebooleanyes
statusstringyes
discardedboolean
autoDiscardableboolean

tabs.navigate ​

Navigate the target tab to a URL.

Runs in extension background. Default timeout 30 s.

Input

FieldTypeRequiredNotes
urlstringyes
waitForLoadbooleandefault true

Output

FieldTypeRequiredNotes
idnumberyes
windowIdnumberyes
urlstringyes
titlestringyes
activebooleanyes
statusstringyes
discardedboolean
autoDiscardableboolean

tabs.reload ​

Reload the target tab.

Runs in extension background. Default timeout 30 s.

Input

FieldTypeRequiredNotes
waitForLoadbooleandefault true

Output

FieldTypeRequiredNotes
idnumberyes
windowIdnumberyes
urlstringyes
titlestringyes
activebooleanyes
statusstringyes
discardedboolean
autoDiscardableboolean

tabs.waitForLoad ​

Wait until the target tab has loaded.

Runs in extension background. Default timeout 30 s.

Input

No fields.

Output

FieldTypeRequiredNotes
idnumberyes
windowIdnumberyes
urlstringyes
titlestringyes
activebooleanyes
statusstringyes
discardedboolean
autoDiscardableboolean

tabs.goBack ​

Go back one step in the target tab's history.

Runs in extension background. Default timeout 30 s.

Input

FieldTypeRequiredNotes
waitForLoadbooleandefault true

Output

FieldTypeRequiredNotes
idnumberyes
windowIdnumberyes
urlstringyes
titlestringyes
activebooleanyes
statusstringyes
discardedboolean
autoDiscardableboolean

tabs.goForward ​

Go forward one step in the target tab's history.

Runs in extension background. Default timeout 30 s.

Input

FieldTypeRequiredNotes
waitForLoadbooleandefault true

Output

FieldTypeRequiredNotes
idnumberyes
windowIdnumberyes
urlstringyes
titlestringyes
activebooleanyes
statusstringyes
discardedboolean
autoDiscardableboolean

tabs.update ​

Pin, mute or zoom the target tab, or keep Chrome from discarding it (autoDiscardable: false) while it works in the background.

Runs in extension background.

Input

FieldTypeRequiredNotes
pinnedboolean
mutedboolean
zoomnumbermin 0.25, max 5
autoDiscardableboolean

Output

FieldTypeRequiredNotes
idnumberyes
windowIdnumberyes
urlstringyes
titlestringyes
activebooleanyes
statusstringyes
discardedboolean
autoDiscardablebooleanyes
pinnedbooleanyes
mutedbooleanyes
zoomnumberyes

windows ​

windows.list ​

List browser windows.

Runs in extension background.

Input

No fields.

Output

FieldTypeRequiredNotes
windows{ id: number; focused: boolean; state: string; type: string; incognito: boolean; left?: number; top?: number; width?: number; height?: number; tabCount: number }[]yes

windows.open ​

Open a new browser window, optionally at a URL.

Runs in extension background. Default timeout 30 s.

Input

FieldTypeRequiredNotes
urlstring
focusedbooleandefault true
type"normal" | "popup"default "normal"
leftnumbermin -9007199254740991, max 9007199254740991
topnumbermin -9007199254740991, max 9007199254740991
widthnumbermin 100, max 9007199254740991
heightnumbermin 100, max 9007199254740991
waitForLoadbooleandefault true

Output

FieldTypeRequiredNotes
idnumberyes
focusedbooleanyes
statestringyes
typestringyes
incognitobooleanyes
leftnumber
topnumber
widthnumber
heightnumber
tabCountnumberyes
tab{ id: number; windowId: number; url: string; title: string; active: boolean; status: string; discarded?: boolean; autoDiscardable?: boolean }

windows.update ​

Focus, resize, move, minimize or maximize a window.

Runs in extension background.

Input

FieldTypeRequiredNotes
windowIdnumberyes
focusedboolean
state"normal" | "minimized" | "maximized" | "fullscreen"
leftnumbermin -9007199254740991, max 9007199254740991
topnumbermin -9007199254740991, max 9007199254740991
widthnumbermin 100, max 9007199254740991
heightnumbermin 100, max 9007199254740991

Output

FieldTypeRequiredNotes
idnumberyes
focusedbooleanyes
statestringyes
typestringyes
incognitobooleanyes
leftnumber
topnumber
widthnumber
heightnumber
tabCountnumberyes

windows.close ​

Close a window and all its tabs.

Runs in extension background.

Input

FieldTypeRequiredNotes
windowIdnumberyes

Output

No fields.

capture ​

capture.screenshot ​

Capture the visible part of the target tab, or crop to one element. A tab in the background is captured through tab capture (the tabCapture group).

Runs in extension background. Default timeout 15 s.

Input

FieldTypeRequiredNotes
format"png" | "jpeg"default "png"
qualitynumbermin 0, max 100
locatorLocator

Output

FieldTypeRequiredNotes
dataUrlstringyes
widthnumberyes
heightnumberyes

capture.fullPage ​

Capture the whole page by scrolling and stitching. A tab in the background is captured through tab capture (the tabCapture group). Fixed headers may show more than once.

Runs in extension background. Default timeout 90 s.

Input

FieldTypeRequiredNotes
format"png" | "jpeg"default "png"
qualitynumbermin 0, max 100
maxHeightnumberdefault 15000, min 100, max 30000

Output

FieldTypeRequiredNotes
dataUrlstringyes
widthnumberyes
heightnumberyes
truncatedbooleanyes

tabCapture ​

tabCapture.start ​

Keep the target tab rendering in the background by capturing it: Chrome keeps painting it, runs its animation frames and timers at full speed, and doesn't discard it. Screenshots of it then work without bringing it to the front. The extension must have been invoked on the tab (toolbar button, side panel, shortcut or context menu) since it last navigated; otherwise this fails with NEEDS_USER_GESTURE.

Runs in extension background. Default timeout 15 s.

Input

No fields.

Output

FieldTypeRequiredNotes
tabIdnumberyes
widthnumberyes
heightnumberyes

tabCapture.stop ​

Stop capturing the target tab, so Chrome can throttle it again.

Runs in extension background.

Input

No fields.

Output

FieldTypeRequiredNotes
stoppedbooleanyes

tabCapture.list ​

List the tabs being captured to keep them rendering.

Runs in extension background.

Input

No fields.

Output

FieldTypeRequiredNotes
tabIdsnumber[]yes

frames ​

frames.list ​

List the frames (iframes) in the target tab, to target one with { frame: frameId } or { frame: { urlMatch } }.

Runs in extension background.

Input

No fields.

Output

FieldTypeRequiredNotes
frames{ frameId: number; parentFrameId: number; url: string }[]yes

page ​

page.info ​

URL, title, viewport, scroll position and document size.

Runs in the page (content runtime).

Input

No fields.

Output

FieldTypeRequiredNotes
urlstringyes
titlestringyes
viewport{ width: number; height: number; devicePixelRatio: number }yes
scroll{ x: number; y: number }yes
document{ width: number; height: number }yes

page.scroll ​

Scroll the page to a position, by an amount, or to the top or bottom.

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
xnumber
ynumber
bybooleandefault false
to"top" | "bottom"
behavior"auto" | "smooth" | "instant"default "instant"

Output

FieldTypeRequiredNotes
scroll{ x: number; y: number }yes

dom ​

dom.query ​

Find elements and describe them.

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
locatorLocatoryes
allbooleandefault false
limitnumberdefault 50, min 1, max 500
textMaxLengthnumberdefault 200, min 0, max 9007199254740991
waitbooleandefault true

Output

FieldTypeRequiredNotes
elements{ ref: string; tag: string; role: string; name: string; text?: string; value?: string; checked?: boolean; disabled?: boolean; href?: string; attributes: Record<string, string>; box: { x: number; y: number; width: number; height: number }; visible: boolean }[]yes

dom.text ​

Readable text of the page or of one element.

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
locatorLocator
maxLengthnumberdefault 20000, min 1, max 9007199254740991

Output

FieldTypeRequiredNotes
textstringyes
truncatedbooleanyes

dom.snapshot ​

Compact accessibility-style tree with refs for interactive elements.

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
locatorLocator
maxNodesnumberdefault 1500, min 1, max 20000
interactiveOnlybooleandefault false
viewportOnlybooleandefault false
textMaxLengthnumberdefault 300, min 10, max 5000
format"tree" | "text" | "both"default "both"

Output

FieldTypeRequiredNotes
rootSnapshotNode
textstring
nodeCountnumberyes
truncatedbooleanyes

dom.html ​

HTML of the page or of one element. Password and payment field values are masked; shadow roots are not included.

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
locatorLocator
outerbooleandefault true
maxLengthnumberdefault 500000, min 1, max 5000000

Output

FieldTypeRequiredNotes
htmlstringyes
lengthnumberyes
truncatedbooleanyes

dom.click ​

Click an element.

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
locatorLocatoryes
button"left" | "middle" | "right"default "left"
clickCountnumberdefault 1, min 1, max 3
modifiers("Alt" | "Control" | "Meta" | "Shift")[]default []
holdMsnumberdefault 0, min 0, max 10000

Output

FieldTypeRequiredNotes
refstringyes

dom.hover ​

Move the pointer over an element.

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
locatorLocatoryes

Output

FieldTypeRequiredNotes
refstringyes

dom.focus ​

Focus an element.

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
locatorLocatoryes

Output

FieldTypeRequiredNotes
refstringyes

dom.type ​

Type text key by key into an element (or the focused element).

Runs in the page (content runtime). Default timeout 30 s.

Input

FieldTypeRequiredNotes
locatorLocator
textstringyes
delayMsnumberdefault 0, min 0, max 1000
clearbooleandefault false

Output

FieldTypeRequiredNotes
refstringyes

dom.fill ​

Set the value of an input in one step.

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
locatorLocatoryes
valuestringyes

Output

FieldTypeRequiredNotes
refstringyes

dom.select ​

Choose options in a <select> by value or label.

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
locatorLocatoryes
valuesstring[]yes

Output

FieldTypeRequiredNotes
refstringyes
selectedstring[]yes

dom.check ​

Check or uncheck a checkbox or radio.

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
locatorLocatoryes
checkedbooleandefault true

Output

FieldTypeRequiredNotes
refstringyes
checkedbooleanyes

dom.press ​

Press a key on an element (or the focused element).

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
locatorLocator
keystringyes
modifiers("Alt" | "Control" | "Meta" | "Shift")[]default []

Output

No fields.

dom.blur ​

Take focus away from an element (or the focused element).

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
locatorLocator

Output

FieldTypeRequiredNotes
refstring

dom.drag ​

Drag an element onto another element, or by an offset (sliders, sortable lists, HTML5 drag and drop).

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
from{ ref?: string; role?: string; name?: string; text?: string; testId?: string; css?: string; nth?: number; exact?: boolean }yes
to{ ref?: string; role?: string; name?: string; text?: string; testId?: string; css?: string; nth?: number; exact?: boolean }
offset{ x: number; y: number }
stepsnumberdefault 10, min 1, max 100

Output

FieldTypeRequiredNotes
fromstringyes
tostring
html5booleanyes

dom.upload ​

Give files to an <input type=file>, or drop them on a drop zone. Content is base64 (or text).

Runs in the page (content runtime). Default timeout 30 s.

Input

FieldTypeRequiredNotes
locatorLocatoryes
files{ name: string; mimeType?: string; base64?: string; text?: string }[]yes

Output

FieldTypeRequiredNotes
refstringyes
filesnumberyes
via"input" | "drop"yes

dom.scroll ​

Scroll inside a scrollable element (a list, a panel) by an amount, to a position, or to an edge.

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
locatorLocatoryes
xnumber
ynumber
bybooleandefault true
to"top" | "bottom" | "left" | "right"
behavior"auto" | "smooth" | "instant"default "instant"

Output

FieldTypeRequiredNotes
refstringyes
scrollTopnumberyes
scrollLeftnumberyes
scrollHeightnumberyes
scrollWidthnumberyes
clientHeightnumberyes
clientWidthnumberyes

dom.wheel ​

Turn the mouse wheel over an element (or the page). Fires wheel events, then scrolls if the page didn't cancel them.

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
locatorLocator
deltaXnumberdefault 0
deltaYnumberdefault 100
stepsnumberdefault 1, min 1, max 50

Output

FieldTypeRequiredNotes
refstring
scrolledbooleanyes
scrollTopnumberyes
scrollLeftnumberyes

dom.selectText ​

Select text: a range in an input, part of an element's text, or all of it.

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
locatorLocatoryes
startnumbermin 0, max 9007199254740991
endnumbermin 0, max 9007199254740991
textstring

Output

FieldTypeRequiredNotes
refstringyes
selectedstringyes

dom.paste ​

Paste text into an element (or the focused element): fires a paste event, then inserts the text unless the page handled it.

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
locatorLocator
textstringyes

Output

FieldTypeRequiredNotes
refstringyes
handledByPagebooleanyes

dom.pointer ​

Low-level pointer: press, move or release at an element (or viewport point). For custom gestures.

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
type"down" | "move" | "up"yes
locatorLocator
xnumber
ynumber
button"left" | "middle" | "right"default "left"

Output

FieldTypeRequiredNotes
refstring
xnumberyes
ynumberyes

dom.scrollTo ​

Scroll an element into view.

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
locatorLocatoryes
block"start" | "center" | "end" | "nearest"default "center"
behavior"auto" | "smooth" | "instant"default "instant"

Output

FieldTypeRequiredNotes
refstringyes

edit ​

edit.setHtml ​

Replace or insert HTML at an element. The HTML is sanitized first: scripts, frames, plugins, event-handler attributes and javascript: URLs are removed.

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
locatorLocatoryes
htmlstringyesmax length 5000000
position"inner" | "outer" | "beforebegin" | "afterbegin" | "beforeend" | "afterend"default "inner"

Output

FieldTypeRequiredNotes
refsstring[]yes
removednumberyes

edit.setText ​

Replace an element's text content (removes its children).

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
locatorLocatoryes
textstringyesmax length 5000000

Output

FieldTypeRequiredNotes
refstringyes

edit.setAttributes ​

Set or remove attributes on an element (null removes). Event-handler attributes and javascript: URLs are refused.

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
locatorLocatoryes
attributesRecord<string, string,null>yes

Output

FieldTypeRequiredNotes
refstringyes
attributesRecord<string, string>yes

edit.remove ​

Remove elements from the page.

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
locatorLocatoryes
allbooleandefault false

Output

FieldTypeRequiredNotes
removednumberyes

wait ​

wait.for ​

Wait for an element state or a URL.

Runs in the page (content runtime). Default timeout 15 s.

Input

FieldTypeRequiredNotes
locatorLocator
state"attached" | "detached" | "visible" | "hidden"default "visible"
urlMatchstring

Output

FieldTypeRequiredNotes
refstring

overlay ​

overlay.highlight ​

Outline elements on the page, with an optional label.

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
locatorLocatoryes
allbooleandefault false
labelstring
colorstringdefault "#7c3aed"
durationMsnumberdefault 0, min 0, max 9007199254740991
idstring

Output

FieldTypeRequiredNotes
idstringyes
countnumberyes

overlay.clear ​

Remove highlights (one id, or all).

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
idstring

Output

No fields.

overlay.toast ​

Show a short message on the page.

Runs in the page (content runtime).

Input

FieldTypeRequiredNotes
messagestringyesmax length 500
kind"info" | "success" | "error"default "info"
durationMsnumberdefault 3000, min 500, max 30000

Output

No fields.

picker ​

picker.start ​

Let the person pick an element. Resolves with its locator; Esc cancels.

Runs in the page (content runtime). Default timeout 120 s.

Input

FieldTypeRequiredNotes
promptstringmax length 200

Output

FieldTypeRequiredNotes
refstringyes
locatorLocatoryes
element{ ref: string; tag: string; role: string; name: string; text?: string; value?: string; checked?: boolean; disabled?: boolean; href?: string; attributes: Record<string, string>; box: { x: number; y: number; width: number; height: number }; visible: boolean }yes

picker.cancel ​

Stop an active picker.

Runs in the page (content runtime).

Input

No fields.

Output

No fields.

downloads ​

downloads.start ​

Download a URL to the person's Downloads folder, and by default wait until it finishes.

Runs in extension background. Default timeout 120 s.

Input

FieldTypeRequiredNotes
urlstringyes
filenamestringmax length 255
conflictAction"uniquify" | "overwrite" | "prompt"default "uniquify"
saveAsbooleandefault false
waitForCompletebooleandefault true

Output

FieldTypeRequiredNotes
idnumberyes
urlstringyes
filenamestringyes
statestringyes
mimestringyes
bytesReceivednumberyes
totalBytesnumberyes
startTimestringyes
errorstring

downloads.list ​

List recent downloads, newest first.

Runs in extension background.

Input

FieldTypeRequiredNotes
querystring
state"in_progress" | "interrupted" | "complete"
limitnumberdefault 50, min 1, max 1000

Output

FieldTypeRequiredNotes
downloads{ id: number; url: string; filename: string; state: string; mime: string; bytesReceived: number; totalBytes: number; startTime: string; error?: string }[]yes

downloads.cancel ​

Cancel a download that is in progress.

Runs in extension background.

Input

FieldTypeRequiredNotes
idnumberyes

Output

No fields.

bookmarks ​

bookmarks.search ​

Find bookmarks whose title or URL contains the text.

Runs in extension background.

Input

FieldTypeRequiredNotes
querystringyes
limitnumberdefault 100, min 1, max 1000

Output

FieldTypeRequiredNotes
bookmarks{ id: string; title: string; url?: string; parentId?: string; index?: number; dateAdded?: number; folder: boolean }[]yes

bookmarks.list ​

List the bookmarks and folders inside a folder (default: the top-level folders).

Runs in extension background.

Input

FieldTypeRequiredNotes
parentIdstringdefault "0"

Output

FieldTypeRequiredNotes
bookmarks{ id: string; title: string; url?: string; parentId?: string; index?: number; dateAdded?: number; folder: boolean }[]yes

bookmarks.create ​

Add a bookmark, or a folder when no url is given.

Runs in extension background.

Input

FieldTypeRequiredNotes
titlestringyes
urlstring
parentIdstring
indexnumbermin 0, max 9007199254740991

Output

FieldTypeRequiredNotes
idstringyes
titlestringyes
urlstring
parentIdstring
indexnumber
dateAddednumber
folderbooleanyes

bookmarks.update ​

Rename a bookmark, change its URL, or move it to another folder or position.

Runs in extension background.

Input

FieldTypeRequiredNotes
idstringyes
titlestring
urlstring
parentIdstring
indexnumbermin 0, max 9007199254740991

Output

FieldTypeRequiredNotes
idstringyes
titlestringyes
urlstring
parentIdstring
indexnumber
dateAddednumber
folderbooleanyes

bookmarks.remove ​

Delete a bookmark, or a folder (a folder with contents needs recursive: true).

Runs in extension background.

Input

FieldTypeRequiredNotes
idstringyes
recursivebooleandefault false

Output

No fields.

history ​

history.search ​

Search the browsing history, most recent first. Times are ms since the epoch.

Runs in extension background.

Input

FieldTypeRequiredNotes
textstringdefault ""
startTimenumber
endTimenumber
limitnumberdefault 100, min 1, max 1000

Output

FieldTypeRequiredNotes
items{ url: string; title: string; lastVisitTime?: number; visitCount: number; typedCount: number }[]yes

history.delete ​

Remove every visit to a URL from the history.

Runs in extension background.

Input

FieldTypeRequiredNotes
urlstringyes

Output

No fields.

cookies ​

cookies.list ​

List cookies for a URL or a domain, optionally by name.

Runs in extension background.

Input

FieldTypeRequiredNotes
urlstring
domainstring
namestring

Output

FieldTypeRequiredNotes
cookies{ name: string; value: string; domain: string; path: string; secure: boolean; httpOnly: boolean; sameSite: string; session: boolean; hostOnly: boolean; expirationDate?: number }[]yes

cookies.set ​

Set a cookie. Without expirationDate (seconds since the epoch) it is a session cookie.

Runs in extension background.

Input

FieldTypeRequiredNotes
urlstringyes
namestringyes
valuestringyes
domainstring
pathstring
secureboolean
httpOnlyboolean
sameSite"no_restriction" | "lax" | "strict" | "unspecified"
expirationDatenumber

Output

FieldTypeRequiredNotes
namestringyes
valuestringyes
domainstringyes
pathstringyes
securebooleanyes
httpOnlybooleanyes
sameSitestringyes
sessionbooleanyes
hostOnlybooleanyes
expirationDatenumber

cookies.remove ​

Delete a cookie by URL and name.

Runs in extension background.

Input

FieldTypeRequiredNotes
urlstringyes
namestringyes

Output

FieldTypeRequiredNotes
removedbooleanyes

permissions ​

permissions.contains ​

Check whether the extension has these permissions or host origins.

Runs in the frame bridge (side panel page); frame controllers only.

Input

FieldTypeRequiredNotes
permissionsstring[]
originsstring[]

Output

FieldTypeRequiredNotes
grantedbooleanyes

permissions.request ​

Ask the person for optional permissions or host origins. Needs a click in the frame within the last few seconds.

Runs in the frame bridge (side panel page); frame controllers only. Default timeout 120 s.

Input

FieldTypeRequiredNotes
permissionsstring[]
originsstring[]

Output

FieldTypeRequiredNotes
grantedbooleanyes

permissions.getAll ​

List the permissions and host origins the extension has now.

Runs in the frame bridge (side panel page); frame controllers only.

Input

No fields.

Output

FieldTypeRequiredNotes
permissionsstring[]yes
originsstring[]yes

Events ​

Subscribe with ext.on(name, handler). Patterns like "tab.*" work.

tab.updated ​

FieldTypeRequiredNotes
tab{ id: number; windowId: number; url: string; title: string; active: boolean; status: string; discarded?: boolean; autoDiscardable?: boolean }yes
changesRecord<string, unknown>yes

tab.activated ​

FieldTypeRequiredNotes
tabIdnumberyes
windowIdnumberyes

tab.removed ​

FieldTypeRequiredNotes
tabIdnumberyes

picker.selected ​

FieldTypeRequiredNotes
refstringyes
locatorRecord<string, string>yes
urlstringyes

picker.hovered ​

FieldTypeRequiredNotes
refstringyes
rolestringyes
namestringyes

The SDK packages are released under the MIT license.