We have an onLoadingStateChanged callback for the ChatBox and ConversationList, so that users can show a placeholder while the WebView (and the iframe) is loading.
I'm using a MutationObserver to see when the iframe is mounted, and I'm firing the loaded event once the iframe is in the loaded state.
Actually, instead of using MutationObserver, waiting for the mount promise to resolve works as well (maybe the promise is resolved before the load event on the iframe though, but it could still be acceptable)
cc @eteeselink
We have an
onLoadingStateChanged
callback for the ChatBox and ConversationList, so that users can show a placeholder while the WebView (and the iframe) is loading.I'm using a
MutationObserver
to see when the iframe is mounted, and I'm firing theloaded
event once the iframe is in theloaded
state.