Meta object

Translucent provides a meta object via window.translucent or simply translucent:

{
   "build_timestamp": "2020-11-17T14:25:00",
   "components": {foo-bar: ƒ, ...},
   "logger": class Logger,
   "theme": class Theme,
   "version": "1.0.0",
}

Access timestamp & version

To get the build informations you can access the build_timestamp and version properties of the meta object:

translucent.build_timestamp   # e.g. "2020-11-17T14:25:00"
translucent.version           # e.g. "1.0.0"

Access logger

To access the Logger(), you can use the logger property of the meta object.

translucent.logger

Access components

All components are registered in the components property of the meta object:

translucent.components['foo-bar']

Hint

See Debugging components if you want to know how to debug components.

Access theme

To access the Theme() instance you can use the theme property of the meta object:

translucent.theme

Hint

See Debugging components if you want to know how to debug the theme.

If you want to activate the debug mode for the theme, use theme as component name.