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:

Parameter Type Description
name "css-change" Should be 'css-change'.
callback () => unknown The callback function.
ctx? unknown The context passed as this to the callback function.

Returns: EventRefThe event reference.

Example:

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