Closed mmm111mmm closed 8 years ago
I think you can check libraryLoaded
. That's inherited from iron-jsonp.
That seems like it'd work, but that property is inherited into google-js-api.
Whereas, google-client-api embeds the google-js-api.
Therefore, any library-loaded property set on google-client-loader won't be passed through the google-js-api, unless I'm missing something.
You can check the api
property. It'll return undefined when the client is not ready.
It currently fires an event.
But there's a case where you may miss the event, but want to check if the client-loader has finished loading its API.
Could we add a public boolean property to state it's been loaded?
Currently it's private:
(My albeit sketchy understanding of javascript promises could help here. Yet there's no promises support in the library, from what I can tell, and putting the onus on the user to wrap something in a promise may be a little burdensome?)