Using the Firebase Javascript library, I can use the onDisconnect() method to schedule a database update when the client is disconnected.
Google has released a set of Polymer Elements called PolymerFire, which make hooking Polymer apps and Firebase very easy.
Has anybody figured out how to use the onDisconnect method from inside a Polymer app using PolymerFire?
I found the answer!
So, at the start of my app, I initialized the firebase-app like this:
Then, later in my app, I add a firebase-document to watch my connection status:
and I added an observer on conStatData:
And finally, the payoff code: