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

Commit

Permalink
Merge pull request #37 from mbleigh/patch-1
Browse files Browse the repository at this point in the history
Fire data-ready event on loaded data
  • Loading branch information
addyosmani committed Jan 24, 2015
2 parents 2e6f73e + 754a148 commit a3c8fb1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions firebase-element.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,13 @@ <h3>My Firebase Data</h3>
*
* @event data-change
*/

/**
* Fired when the remote location has been read, whether or not data
* has been returned.
*
* @event data-ready
*/

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

0 comments on commit a3c8fb1

Please sign in to comment.