File tree Expand file tree Collapse file tree 5 files changed +38
-19
lines changed
Expand file tree Collapse file tree 5 files changed +38
-19
lines changed Original file line number Diff line number Diff line change 1- firebase-element
1+ ## Note: This element is for the older Firebase 2.0 API.
2+ For the latest official Firebase 3.0-compatible component from the Firebase team,
3+ see the [ polymerfire] ( https://github.com/firebase/polymerfire ) component.
4+
25================
36
47See the [ component page] ( https://elements.polymer-project.org/elements/firebase-element?active=firebase-collection ) for more information.
Original file line number Diff line number Diff line change 1111< link rel ="import " href ="../polymer/polymer.html ">
1212
1313<!--
14+ **Note: This element is for the older Firebase 2 API**
15+ For the latest official Firebase 3.0-compatible component from the Firebase team,
16+ see the [polymerfire](https://github.com/firebase/polymerfire) component.
17+
1418Element wrapper for the Firebase authentication API (https://www.firebase.com/docs/web/guide/user-auth.html).
1519
1620@demo demo/index.html
Original file line number Diff line number Diff line change 1212< link rel ="import " href ="firebase-query-behavior.html ">
1313
1414<!--
15+ **Note: This element is for the older Firebase 2 API**
16+ For the latest official Firebase 3.0-compatible component from the Firebase team,
17+ see the [polymerfire](https://github.com/firebase/polymerfire) component.
18+
1519An element wrapper for the Firebase API that provides a view into the provided
1620Firebase location as an ordered collection.
1721
@@ -257,7 +261,7 @@ <h4>[[dinosaur.__firebaseKey__]]</h4>
257261
258262 if ( ! this . query ) {
259263 this . _fireQueryError ( 'Query does not exist' ) ;
260- return ;
264+ return ;
261265 }
262266
263267 query = this . query . ref ( ) . push ( ) ;
@@ -336,7 +340,7 @@ <h4>[[dinosaur.__firebaseKey__]]</h4>
336340
337341 if ( ! this . query ) {
338342 this . _fireQueryError ( 'Query does not exist' ) ;
339- return ;
343+ return ;
340344 }
341345
342346 var key = change . path . split ( '.' ) [ 1 ] ;
@@ -399,7 +403,7 @@ <h4>[[dinosaur.__firebaseKey__]]</h4>
399403
400404 try {
401405 query = new Firebase ( location ) ;
402-
406+
403407 if ( orderByMethodName ) {
404408 if ( orderByMethodName === 'orderByChild' ) {
405409 query = query [ orderByMethodName ] ( this . orderByChild ) ;
@@ -429,13 +433,13 @@ <h4>[[dinosaur.__firebaseKey__]]</h4>
429433 }
430434
431435 } catch ( e ) {
432-
436+
433437 this . _fireQueryError ( 'Query cannot be instantiated with location ' + location + ' (' + e . toString ( ) + ')' ) ;
434-
438+
435439 } finally {
436-
440+
437441 return query ;
438-
442+
439443 }
440444
441445 } ,
Original file line number Diff line number Diff line change 1313< link rel ="import " href ="firebase-query-behavior.html ">
1414
1515<!--
16+ **Note: This element is for the older Firebase 2 API**
17+ For the latest official Firebase 3.0-compatible component from the Firebase team,
18+ see the [polymerfire](https://github.com/firebase/polymerfire) component.
19+
1620An element wrapper for the Firebase API.
1721
1822A `<firebase-document>` is a reference to a remote document somewhere on
9296 }
9397 var query ;
9498 try {
95-
99+
96100 query = new Firebase ( location ) ;
97-
101+
98102 } catch ( e ) {
99-
103+
100104 this . _fireQueryError ( 'Query cannot be instantiated with location ' + location + ' (' + e . toString ( ) + ')' ) ;
101105
102106 } finally {
106110
107111 _updateRemoteDocument : function ( ) {
108112 this . _log ( 'Updating remote document' ) ;
109-
113+
110114 if ( ! this . query ) {
111115
112116 this . _fireQueryError ( 'Query does not exist' ) ;
113- return ;
117+ return ;
114118
115119 }
116120
117121 this . query . update ( this . dataAsObject ) ;
118-
122+
119123 } ,
120124
121125 _setRemoteDocumentChild : function ( key , value ) {
122126 if ( ! this . query ) {
123127
124128 this . _fireQueryError ( 'Query does not exist' ) ;
125- return ;
129+ return ;
126130
127131 }
128132
129133 this . debounce ( 'set-' + key , function ( ) {
130134 this . _log ( 'Setting child "' + key + '" to' , value ) ;
131135 this . query . child ( key ) . set ( value ) ;
132136 } ) ;
133-
137+
134138 } ,
135139
136140 _removeRemoteDocumentChild : function ( key ) {
137141 this . _log ( 'Removing child "' + key + '"' ) ;
138-
142+
139143 if ( ! this . query ) {
140144
141145 this . _fireQueryError ( 'Query does not exist' ) ;
142- return ;
146+ return ;
143147
144148 }
145149
Original file line number Diff line number Diff line change 1212< link rel ="import " href ="firebase.html ">
1313
1414< script >
15- /** @polymerBehavior */
15+ /** @polymerBehavior
16+ **Note: This element is for the older Firebase 2 API**
17+ For the latest official Firebase 3.0-compatible component from the Firebase team,
18+ see the [polymerfire](https://github.com/firebase/polymerfire) component.
19+ */
1620 Polymer . FirebaseQueryBehavior = {
1721 properties : {
1822 /**
You can’t perform that action at this time.
0 commit comments