For the element to be rendered it’s required that the js-code reruns. How can I achieve that? On the frontend everything works fine and as expected, it’s just a builder-issue.
Inside your custom element PHP class, make sure to define the
$scripts variable, and add the name(s) of the JS function(s) you want to run on it as an array.
public $scripts = ['bricksCounter'];
bricksCounter JS function name with your own
This is also mentioned in our developer docs:
thank you so much for your reply! Works like a charme now! I have had read the documentation but I didn’t know that the term ‘script’ refers to a function. I thought it referred to a script tag or filename. I had tried that but of course without success.
Br and thanks!