backbone.js - Backbone Events: logging all events when they are triggered -


i'm creating events object using bit of backbone , underscore follows:

var appevents = _.extend({}, backbone.events); 

i'm trying create function console.log , event triggered object, regardless of where, how or listeners has, kinda unsure how i'd that. i'm still experimenting backbone.

i think using listento method way go... again, not sure how i'd implement that.

you can use backbone's special all event:

appevents.on("all", function(eventname){     console.log(eventname + ' triggered!'); }); 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -