Closed Hamish-taylor closed 1 year ago
Both Darcy and Sean have looked into this and ran unit tests.
@Hamish-taylor , do at least the following before releasing: (1) presoaking a prerelease to our website (at least a day ) and (2) also try to deploy a test website that would have triggered the error to test it's ok.
Then, first release on npm and nuget; wait for a couple of days and then release on CDN. Keep CS informed on each step
@CmdrKeen FYI
This PR is to solve an issue first surfaced in issue #473.
The problem
We are assuming rg4js is loaded when
document.readyState
is marked ascomplete
. However, this is not true, it's not loaded until after theload
event has been triggered. According to the speccomplete
indicates that theload
event is about to fire. This leaves a small gap where if our code is executed between the document state being marked as complete and theload
event firing, an infinite recursive loop is started that will hang the application.The fix
The current fix I have in mind for this is to add a variable to the window that is set to true after we know for sure rg4js is initialized. The UMD initialization code will then wait for this rather than
document.readyState === 'complete'