In Reactive modules, do all scripts added to the module's Required Scripts load before the OnApplicationReady is fired? I've been getting intermittent errors where it seems the script hasn't run yet when I try to call it here.
Edit with more details:
The structure of our app looks like this:
PortalA (Reactive| End User/Home. Other similar modules like this, e.g. PortalB, PortalC)
PortalCore (Reactive | Core. Has theme, layouts, web blocks, core Initialization actions)
Script_Lib (Library | Foundation)
Hi Emma,
According to this On Application Ready Document:
As your description, I'm not sure that it is Home module or not.
Hope this helps,
Cheers,
Khuong
The OnApplicationReady event is in the Home module. I updated the description with more details on the module structure.
In the event documentation you can also find "The On Application Ready action runs asynchronously, and doesn't block the render of the screens.". I assume that the Required Scripts have the same behaviour, i.e. they don't block the render of the app and the onApplicationReady execution.
Even though not entirely related with your issue but similar, in one of the projects I was involved in, I had a issue where I needed to call a JS lib (loaded in the OnApplicationReady event) in the OnReady event of the screen and it was raising the non defined exception. I had to implement a setTimeout to be constantly fired until the lib was initialized. Maybe you can use a similar approach.
Hope this somehow can help you.
Regards,
António Pereira