gapi.client.load versus google.load

前端 未结 1 1402
故里飘歌
故里飘歌 2021-02-20 07:23

I am confused about how to properly load Google\'s APIs. I see mentioned two different approaches:

First: Google API loader (https://developers.google.

1条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-20 07:55

    Your assessment is correct. These APIs are distinct from each other, and there should not be a conflict in loading both of them (Although you should verify that both of their "on load" methods have been fired before doing any work). However I wouldn't characterize the google.load APIs as "legacy"; google.load is a general mechanism for loading certain Google JS clients, and is not a reflection of the status of the underlying client library.

    0 讨论(0)
提交回复
热议问题