Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
receivedEvent: function(id) {
var parentElement = document.getElementById(id);
var listeningElement = parentElement.querySelector('.listening');
var receivedElement = parentElement.querySelector('.received');
listeningElement.setAttribute('style', 'display:none;');
receivedElement.setAttribute('style', 'display:block;');
console.log('Received Event: ' + id);
console.log('test:' + cordova.platformId);
FCMPlugin.getToken(function(token){
console.log('success:' + token);
alert(token);
},
function(err){
console.log('Error:'+ err);
alert(err);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.