Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Side by Side Diff: lib/src/firebase-element/firebase-auth.html

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/src/firebase-element/.travis.yml ('k') | lib/src/firebase-element/firebase-collection.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!-- 1 <!--
2 @license 2 @license
3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. 3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
4 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt 4 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS.txt 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS.txt
7 Code distributed by Google as part of the polymer project is also 7 Code distributed by Google as part of the polymer project is also
8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt
9 --> 9 -->
10 <link rel="import" href="firebase.html"> 10 <link rel="import" href="firebase.html">
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 * containing the authenticated user object from Firebase. 191 * containing the authenticated user object from Firebase.
192 * 192 *
193 * If login fails, the `error` event is fired, with `e.detail` containing er ror 193 * If login fails, the `error` event is fired, with `e.detail` containing er ror
194 * information supplied from Firebase. 194 * information supplied from Firebase.
195 * 195 *
196 * If the browswer supports `navigator.onLine` network status reporting and the 196 * If the browswer supports `navigator.onLine` network status reporting and the
197 * network is currently offline, the login attempt will be queued until the network 197 * network is currently offline, the login attempt will be queued until the network
198 * is restored. 198 * is restored.
199 * 199 *
200 * @method login 200 * @method login
201 * @param {Object} (optional) params 201 * @param {Object} params (optional)
202 * @param {Object} (optional) options 202 * @param {Object} options (optional)
203 */ 203 */
204 login: function(params, options) { 204 login: function(params, options) {
205 if (!this.ref || navigator.onLine === false) { 205 if (!this.ref || navigator.onLine === false) {
206 this._queuedLogin = {params: params, options: options}; 206 this._queuedLogin = {params: params, options: options};
207 } else { 207 } else {
208 params = params || this.params || undefined; 208 params = params || this.params || undefined;
209 options = options || this.options || undefined; 209 options = options || this.options || undefined;
210 switch(this.provider) { 210 switch(this.provider) {
211 case 'password': 211 case 'password':
212 this.ref.authWithPassword(params, this._loginHandler.bind(this), opt ions); 212 this.ref.authWithPassword(params, this._loginHandler.bind(this), opt ions);
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 if (!error) { 379 if (!error) {
380 this.fire('user-removed'); 380 this.fire('user-removed');
381 } else { 381 } else {
382 this.fire('error', error); 382 this.fire('error', error);
383 } 383 }
384 }.bind(this)); 384 }.bind(this));
385 } 385 }
386 }); 386 });
387 </script> 387 </script>
388 388
OLDNEW
« no previous file with comments | « lib/src/firebase-element/.travis.yml ('k') | lib/src/firebase-element/firebase-collection.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698