Concepts
Event System
Global and object-scoped event channels, payload shapes, and safe subscription patterns.
Event System
Global events
Subscribe through the StringTune instance:
TypeScript
stringTune.on('screen:desktop', () => {
// ...
});
Object-scoped events
Object-scoped channels use string-id as part of the event name.
Examples:
object:progress:heroobject:parallax:heroform:submit:contact
Payload shape
Two common channels emit a plain number:
TypeScript
stringTune.on('object:progress:hero', (value) => {
console.log(value);
});
The same applies to object:parallax:<id>.
What not to document as supported
- private manager access
- unsupported bracket access into private runtime state
- event names that do not exist in the current runtime