Skip to content

Workspace.on('css-change') method

Workspace › on(‘css-change’)

Official

Triggered when the CSS of the app has changed.

Signature:

on(name: "css-change", callback: () => unknown, ctx?: unknown): EventRef

Parameters:

ParameterTypeDescription
name"css-change"Should be 'css-change'.
callback() => unknownThe callback function.
ctx?unknownThe context passed as this to the callback function.

Returns: EventRefThe event reference.

Example:

app.workspace.on('css-change', () => {
console.log('css-change');
});