backbone.marionette
backbone.marionette copied to clipboard
triggerMethod: do not look for method in options
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)
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.