Skip to content

CapabilityPolicy

Defined in: packages/core/src/capabilities.ts:59

PropertyTypeDescriptionDefined in
allowedOrigins?string[]Origins live-data endpoints may point at. Undefined means unrestricted.packages/core/src/capabilities.ts:76
allowHtml?booleanRaw markup via the !html tag. Denied by default in untrusted contexts.packages/core/src/capabilities.ts:74
inlineState?booleanForce state: to compile away even when the target runtime supports it. Remarks state and global-state are maplibre-gl JS only — as of style-spec 24.8.5, Android and iOS are still open issues — so a style emitted with state intact does not render on maplibre-native at any version. A caller who needs the emitted artifact to be portable across renderers sets this, and the runtime gate inlines the defaults as it would for an old JS target. Default is off: keeping state is right for the common JS case, and this makes full portability reachable without making it the default.packages/core/src/capabilities.ts:89
target?stringTarget maplibre-gl version, as a semver string. Remarks Undefined means “assume the floor is not met” rather than “assume it is”. A caller who has not said which runtime they target is not making a claim about it, and guessing generously produces a style that validates in CI and renders blank in production.packages/core/src/capabilities.ts:69
trustTrustContext-packages/core/src/capabilities.ts:70