Open f0rr0 opened 3 years ago
Hi @f0rr0, thanks the suggestion! The R17.1 engine release added a new lifecycle event, onRemove
, which is called when a pipeline module is removed. Along with that we updated loading-module.js
to call hideLoadingScreenNow()
in onRemove
. This should lead to the loading module cleaning itself up when you exit an 8th Wall experience, which is something it didn't do well before.
Does this solve your issue? With it you shouldn't need to call hideLoadingScreen
or hideLoadingScreenNow
yourself, instead the pipeline module should clean itself up. If not I'd love to learn more about what's missing for your scenario. Thanks!
Expose
hideLoadingScreen
andhideLoadingScreenNow
to consumers.Since
showLoading
mutates DOM, consumers can call these methods to clean up side-effects or bail early from an 8thWall session. For instance if I am inside a SPA and the user decides to exit the 8thwall route before the loading has finished, I would call these methods to cleanup the loading DOM mutations.