sarriaroman / FabricPlugin

Fabric.io plugin for Cordova or Phonegap
MIT License
198 stars 159 forks source link

sendCustomEvent with attributes #115

Open ssaurav2512 opened 6 years ago

ssaurav2512 commented 6 years ago

Hi. I started using the plugin and it works great! But I'm not able to figure out how to send attributes with a custom event. I'm sending it in the following format: sendCustomEvent("eventname","val1","val2") I'm not getting any errors, but I know its not the right format. Can someone help me out? Thanks!

davidquon commented 6 years ago

It should be something like this:

let attributes = {
  key1: value1,
  key2: value2
};
sendCustomEvent("eventName", attributes);
Thomasbehan commented 5 years ago

or add attributes to current events if its not possible already like below: try{ //do something }catch(err){ sendNonFatalCrash("error message", err); }