backbone.marionette icon indicating copy to clipboard operation
backbone.marionette copied to clipboard

triggerMethod: do not look for method in options

Open blikblum opened this issue 6 years ago • 1 comments

Description

Currently triggerMethod looks for a matching method in the options through a call to getOption before looking in instance. We should consider removing this feature:

1- triggerMethod is a pretty hot function and we should keep as fast and simple as possible 2- Is not documented (only now, after some years using Mn i realized its existence)

blikblum avatar Nov 15 '17 09:11 blikblum

FWIW I don't think triggerMethod needs to check if it's a function either.

Right now

View.extend({
  onRender: 1
});

will work just fine. Might as well let onRender.apply fail instead of silently ignore it.

paulfalgout avatar Nov 15 '17 12:11 paulfalgout