Hi, I have a piece of backend code in JSW, how can I import this code into header of “Custom Code”.
I tried inside “Header” of “Custom Code” but did not work.
What is the correct path to reach my JSW files in the backend when it comes to “Custom Code”?
Custom Code (in the Header) cannot import code from the backend. Backend web module code (.jsw file) is only accessible by Velo page code.
Is there a way to interact with Custom Code from Page Code or Backend?
For example, I have console.log in Custom Code and want to trigger/execute that console.log from Page Code or backend.
@johnnetr The Custom Code is isolated from the page code (Velo). Depending on your code, you might be able to use an HtmlComponent . For more information, see the article Working with the HTML Component in Velo . You might also consider a Custom Element .
I solved the problem by manipulating the DOM with MutationObserver
Nice. You should perhaps share this as a tip in the Tips, Techniques, Examples category. Maybe include a short code snippet.