Load a UI Script in a UI component
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2025 02:55 AM - edited 01-24-2025 02:56 AM
Hello,
I'm struggling with something that may not be possible...
I need to import a UI script and use it in a custom UI Component.
From the component, I tried to load it in the header of document (with script tag) but somehow the UI Component can't "reach" it. Even after onload, it seems that the UI Component execution environment can't access to all the scripts that are loaded in the browser ? Can someone confirm that ?
So I also tried to load the script (still with script tag) inside the UI component, but load fails with this kind of message : Error occurred when processing script: ** TypeError: api.context.props.userPrefs is null
Is there a way of loading a UI script correctly in a custom UI component ? Like the ScriptLoader API and getScripts method but for the UX Framework.
Best regards,
Régis.