Open Carreau opened 1 week ago
This should allow something like:
if (window.pst_theme_change_hooks == undefined) {
window.pst_theme_change_hooks = [];
}
window.pst_theme_change_hooks.push(function(evt){console.log('switched to theme', evt)});
Or should we have a register_hook
function that ensure that the hook re triggered at least once when they are registered after the mode has already be set ?
Mostly thinking of jupyter-lite-sphinx which wants to sync the JupyterLab theme with pydata one.
I'm not sure this is the right approach, but at least that should get the discussion started.