There are a couple of ways to execute your functions when UserGuiding code is loaded.
The first one is to push an onload
event to userGuidingLayer as below. We'll execute this command when the UserGuiding application is loaded.
window.userGuidingLayer.push({
event: 'onload',
fn: _YOUR_FUNCTION_HERE_,
})
Another one is to set a variable called onUserGuidingLoad
explicitly to the window.
window.onUserGuidingLoad = _YOUR_FUNCTION_HERE_