Skip to content

PopupBuilder

Defined in: packages/core/src/renderer/popup-builder.ts:68

Builds popup HTML from configuration and feature properties.

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.

new PopupBuilder(policy?, options?): PopupBuilder

Defined in: packages/core/src/renderer/popup-builder.ts:79

ParameterTypeDefault valueDescription
policyCapabilityPolicyDEFAULT_POLICYthe capability policy (see the class remarks).
options{ language?: () => string | undefined; }{}-
options.language?() => string | undefinedundefinedthe 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.

PopupBuilder

build(content, properties): string

Defined in: packages/core/src/renderer/popup-builder.ts:90

Build HTML string from popup content config and feature properties

ParameterType
contentRecord<string, object[]>[]
propertiesRecord<string, any>

string