Skip to content

allow options.* as event handler callee#900

Merged
Rich-Harris merged 1 commit intomasterfrom
event-handler-options-callee
Oct 20, 2017
Merged

allow options.* as event handler callee#900
Rich-Harris merged 1 commit intomasterfrom
event-handler-options-callee

Conversation

@Conduitry
Copy link
Copy Markdown
Member

Gitter convo.

This is a little hacky, as the handling of options.* is different than other things that are already in there. It's not like set/fire/destroy, as we're calling options.something(), not just options() - and it's not like this/event/console, as those variables already exist in scope, and for options we need to output component.options.whatever().

@Conduitry
Copy link
Copy Markdown
Member Author

cc @petterek

I think your idea in Gitter of using options for this is a good one - you don't even have to put the functions inside data, you can use whatever layout you want. This PR removes the warning about using options.something directly in an event handler.

@Rich-Harris Rich-Harris merged commit 921ad06 into master Oct 20, 2017
@Rich-Harris Rich-Harris deleted the event-handler-options-callee branch October 20, 2017 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants