Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Commit a3c8fb1

Browse files
committed
Merge pull request #37 from mbleigh/patch-1
Fire data-ready event on loaded data
2 parents 2e6f73e + 754a148 commit a3c8fb1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

firebase-element.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,13 @@ <h3>My Firebase Data</h3>
136136
*
137137
* @event data-change
138138
*/
139+
140+
/**
141+
* Fired when the remote location has been read, whether or not data
142+
* has been returned.
143+
*
144+
* @event data-ready
145+
*/
139146

140147
/**
141148
* Fired when an error occurs on an interaction with Firebase. The
@@ -320,6 +327,7 @@ <h3>My Firebase Data</h3>
320327
this.log && console.log('acquired value ' + this.location);
321328
this.dataReady = true;
322329
this._setData(snapshot.val());
330+
this.fire('data-ready', this.data);
323331
if (this.data) {
324332
this.dataChange();
325333
}

0 commit comments

Comments
 (0)