HalleyInteractive / brackets-notifications

Brackets - Notifications
MIT License
0 stars 0 forks source link

Add a callback #9

Open GriffinSauce opened 10 years ago

GriffinSauce commented 10 years ago

The callback will be called when the notification has been created, with as parameter the element of the notif.

CommandManager.execute("notifications.notification",
{
    title: "Message title",
    message: "Message body"
    callback:function(element){  /* do stuff */  }
});

This can be used by the firing script to manipulate the notification afterwards. Like updating information or adding customized interaction.

HalleyInteractive commented 10 years ago

constructNotification returns the notification object. Maybe having callback isn't necessary anymore.