PopupBuilder
Defined in: packages/core/src/renderer/popup-builder.ts:68
Builds popup HTML from configuration and feature properties.
Remarks
Section titled “Remarks”Carries the capability policy, because whether an !html-marked value renders
as markup or as escaped text is a trust decision, not a content one. The
default policy is untrusted, so a builder constructed with no policy denies
raw HTML — the safe default a host that has thought about none of this gets.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new PopupBuilder(
policy?,options?):PopupBuilder
Defined in: packages/core/src/renderer/popup-builder.ts:79
Parameters
Section titled “Parameters”| Parameter | Type | Default value | Description |
|---|---|---|---|
policy | CapabilityPolicy | DEFAULT_POLICY | the capability policy (see the class remarks). |
options | { language?: () => string | undefined; } | {} | - |
options.language? | () => string | undefined | undefined | the locale numbers are formatted for when a format: names none: usually the page’s language at the map (elementLanguage(map.getContainer())). Read on every build. Absent: the browser’s. |
Returns
Section titled “Returns”PopupBuilder
Methods
Section titled “Methods”build()
Section titled “build()”build(
content,properties):string
Defined in: packages/core/src/renderer/popup-builder.ts:90
Build HTML string from popup content config and feature properties
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
content | Record<string, object[]>[] |
properties | Record<string, any> |
Returns
Section titled “Returns”string