WarUI documentation

Versioned grid API and capabilities

experimental

Inspect the API version and register optional capabilities.

Live example

Expected behavior

A capability stays available while a provider is registered. Calling undo without a history provider gives an install hint.

Source

console.log(api.version, api.getCapabilities());
const release = api.provideCapability({ capability: 'history', undo: undoLastCommand });
if (api.hasCapability('history')) api.undo();
release();

API reference

GRID-A01-F10 API
KindNameTypeDescription
Propertyversion—The version of the installed core package.
MethodhasCapability—Tests one typed capability identifier.
MethodgetCapabilities—Lists built-in and registered capabilities.
ErrorCapabilityMissingError—Names the provider required by an unavailable operation.