---
url: 'https://adk.nht.io/api/@nhtio/adk/batteries/interfaces/BrowserWorkerOptions.md'
description: >-
  Minimal subset of the DOM `WorkerOptions` dictionary this module forwards
  verbatim to
---

# Interface: BrowserWorkerOptions

Defined in: [src/batteries/isolation/browser.ts:48](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/browser.ts#L48)

Minimal subset of the DOM `WorkerOptions` dictionary this module forwards verbatim to `new
 Worker(url, options)` — used ONLY for the `string | URL` spawn form (a caller-supplied
[WorkerResolver](../type-aliases/WorkerResolver.md) constructs its own `Worker` however it likes, this dictionary never applies
there). Classic scripts are the default (`type` omitted) — matching this repo's own LiteRT-LM Worker
prototype (`docs/.vitepress/theme/components/agent/litert_lm_worker_proxy.ts`), which deliberately
avoids `{ type: 'module' }` because Emscripten-style glue calls `importScripts()`, illegal in a module
worker. Pass `{ type: 'module' }` explicitly when the guest script is an ES module.

## Properties

| Property                                         | Type                                       | Description                                                    | Defined in                                                                                                                          |
| ------------------------------------------------ | ------------------------------------------ | -------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
|  `credentials?` | `"omit"` | `"same-origin"` | `"include"` | Worker credentials mode, forwarded verbatim.                   | [src/batteries/isolation/browser.ts:52](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/browser.ts#L52) |
|  `name?`               | `string`                                   | A developer-facing name for the worker (surfaced in devtools). | [src/batteries/isolation/browser.ts:54](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/browser.ts#L54) |
|  `type?`               | `"classic"` | `"module"`                  | `'classic'` (default when omitted) or `'module'`.              | [src/batteries/isolation/browser.ts:50](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/browser.ts#L50) |
