File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 3535
3636@demo
3737-->
38- < dom-module id ="google-client-loader ">
39- < template >
40- < google-js-api on-js-api-load ="_loadClient "> </ google-js-api >
41- </ template >
42- </ dom-module >
4338
4439< script >
4540 ( function ( ) {
115110 }
116111 } ,
117112
113+ hostAttributes : {
114+ hidden : true // remove from rendering tree.
115+ } ,
116+
118117 // Used to fix events potentially being fired multiple times by
119118 // iron-jsonp-library.
120119 _waiting : false ,
138137 return gapi . auth ;
139138 } ,
140139
140+ ready : function ( ) {
141+ this . _loader = document . createElement ( 'google-js-api' ) ;
142+ this . listen ( this . _loader , 'js-api-load' , '_loadClient' ) ;
143+ } ,
144+
145+ detached : function ( ) {
146+ this . unlisten ( this . _loader , 'js-api-load' , '_loadClient' ) ;
147+ } ,
148+
141149 _loadClient : function ( ) {
142150 gapi . load ( 'client' , this . _doneLoadingClient . bind ( this ) ) ;
143151 } ,
You can’t perform that action at this time.
0 commit comments