Skip to content

Instantly share code, notes, and snippets.

@dmcgrath
Created December 15, 2017 03:18
Show Gist options
  • Save dmcgrath/d842ad1d799bc427edd3beaf384eb8aa to your computer and use it in GitHub Desktop.
Save dmcgrath/d842ad1d799bc427edd3beaf384eb8aa to your computer and use it in GitHub Desktop.
Sync changes
noteDocument.set({owner:0}, {merge: true});
noteDocument.onSnapshot(function(documentSnapshot){
noteData = documentSnapshot.data();
if(noteData.owner !== uuid ) {
noteElement.innerHTML = noteData.text || '';
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment