DashletOptions
The options argument of installDashletGlobal(options). Every field is optional; the library runs with fully working defaults.
1. Signature
interface DashletOptions {
expectedOrigin?: string | null;
timeoutMs?: number;
pollIntervalMs?: number;
detectionTimeoutMs?: number;
window?: WindowLike;
}
2. Parameters
| Name | Type | Default | Description |
|---|---|---|---|
|
|
— |
The origin of the webclient host that may send messages (e.g.
|
|
|
|
Standard response timeout in milliseconds for every method call — the
webclient wire calls and the standalone bounded rejections. On timeout the
call rejects with the bounded |
|
|
|
Rich-client bridge polling interval in milliseconds — how often
|
|
|
|
Detection cap in milliseconds: how long the dashlet probes for a
bridge / waits for an |
|
|
current global |
The window object the library operates on. Defaults to the current
global |
Relevance per environment:
| Environment | Options that matter |
|---|---|
webclient |
|
rich client |
|
standalone |
|
3. Examples
const dashlet = installDashletGlobal({
expectedOrigin: 'https://enaio.example.com', // strict mode
timeoutMs: 5000, // default
pollIntervalMs: 50, // default
detectionTimeoutMs: 5000, // default
});
// learning mode: omit expectedOrigin
const dashlet2 = installDashletGlobal({});
4. Errors
-
TypeErrorat install time forexpectedOriginvalues that can never be valid ("*", or any value that is neither an absolute URL nor a file-origin group member) — the rejection happens at install time, not at post time (Origin configuration).