Skip to content

BehaviorRegistry

class

Back to Helios Web API

Kind
class
Source
src/behaviors/BehaviorRegistry.js:13

Description

Registry mapping behavior ids to behavior constructors or factories.

Signature

export class BehaviorRegistry {

Returns

Empty registry ready for built-in or custom behavior registration.

Type BehaviorRegistry

Notes

The registry is the public extension point behind helios.registerBehavior(...); created behaviors still attach through BehaviorManager, so persistence and cleanup flow remains consistent.

Utilities

Additional public helpers that do not belong to a narrower API area.

register(id, behavior) → {this}

Source: src/behaviors/BehaviorRegistry.js:18

Manages register for the current instance.

Parameters

NameTypeAttributesDefaultDescription
idValue passed to register.
behaviorValue passed to register.

Returns

This instance.

Type this

has(id)

Source: src/behaviors/BehaviorRegistry.js:28

Returns the current has value or state.

Parameters

NameTypeAttributesDefaultDescription
idValue passed to has.

create(id, options)

Source: src/behaviors/BehaviorRegistry.js:32

Configures or reads create.

Parameters

NameTypeAttributesDefaultDescription
idValue passed to create.
optionsObjectOptions object for this operation.

Example

const registry = new BehaviorRegistry().register('custom', CustomBehavior);