Skip to content
Ooidget

Ooidget Component Format 0.1Editor's Draft

Extensions and fallbacks

Extensions

An extension adds members, layer kinds, effect types or events. It is named PREFIX_name, where PREFIX is an uppercase vendor prefix: OOIDGET for extensions of this project, otherwise a prefix registered in the specification’s repository. Extension data lives in extensions.PREFIX_name on the component or on the object it extends.

A component file lists every extension it uses in extensionsUsed, and those without which it cannot be rendered meaningfully in extensionsRequired. A runtime MUST NOT render a component that requires an extension it does not support; it reports this to the host instead.

Fallbacks

To keep documents usable across runtimes of different ages and profiles, a runtime MUST treat what it does not understand as follows, and MUST NOT fail:

It does not understandIt MUST
a member of a known objectignore the member
a layer kindskip the layer, or draw its fallback layer if it has one
an effect typeskip the effect
a host-drawn name (slot, primitive, painter) the host does not knowdraw the layer’s fallback, else nothing
an event handler namenever call it
an extension in extensionsUsed onlyproceed without it

A layer’s fallback is a layer, drawn in its place with its box.