Back to All

OneSignal info call with SPA

I noticed there is an alternative way to call the OneSignal info via the JS bridge from your updated doc using: gonative.onesignal.run.onesignalInfo();

I am using a SPA (Vue) and want to try to do things this way. However, I'm confused as to how best to guarantee the JS Bridge library is already fully loaded at the time I call this method. Can I assume that if I'm calling the method within the Vue app that the library has loaded?

I know I can wrap this inside gonative_library_ready() but then that doesn't work well with a SPA since I'd be writing a js function on the index page rather than calling it within the Vue framework.

Thanks!