If I use addJs and AddCss in the onRun function, it’s always added to the layout, even if the markup component is not used. {% component 'demo' %} in the theme.
Is there a way to use the JS and CSS injection only if the markup component is used in the theme?