Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

triggerMethod: do not look for method in options #3545

Open
blikblum opened this issue Nov 15, 2017 · 1 comment
Open

triggerMethod: do not look for method in options #3545

blikblum opened this issue Nov 15, 2017 · 1 comment

Comments

@blikblum
Copy link
Collaborator

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)

@paulfalgout
Copy link
Member

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 paulfalgout changed the title triggerMethod: do look for method in options triggerMethod: do not look for method in options Jan 2, 2018
@paulfalgout paulfalgout added this to the v5 milestone Jun 27, 2018
@paulfalgout paulfalgout self-assigned this Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants