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

Add more ways to specify the base element #18

Merged
merged 4 commits into from Dec 5, 2017
Merged

Add more ways to specify the base element #18

merged 4 commits into from Dec 5, 2017

Conversation

fregante
Copy link
Contributor

@fregante fregante commented Dec 1, 2017

3 new ways:

  • Handle selectors as the base, like jQuery's $('.base').on('click', '.inner', callback)
  • Handle arrays as the base (maybe less useful but comes free with the selector)
  • Skip the element, defaults to global delegation: delegate('.inner', 'click', callback)

It'd need tests and docs, but it's a start for discussion.

@zenorocha
Copy link
Owner

I like that @bfred-it. Can you add tests and docs?

@fregante
Copy link
Contributor Author

fregante commented Dec 5, 2017

Done. However I'm not great at mocha tests.

@zenorocha
Copy link
Owner

Just started reviewing :)

:octocat: Sent from GH.

@zenorocha zenorocha merged commit 23f15b0 into zenorocha:master Dec 5, 2017
@fregante fregante deleted the patch-2 branch December 5, 2017 19:14
zenorocha added a commit that referenced this pull request Dec 5, 2017
@zenorocha
Copy link
Owner

All merged!

@fregante
Copy link
Contributor Author

fregante commented Dec 5, 2017

Thanks for the prompt review and publish!

@zenorocha
Copy link
Owner

I published a minor release since it didn't break the API ;)

@zenorocha
Copy link
Owner

I noticed the code you wrote on that other pull request. It was written in ES6 and it was much easier to understand. What do you think of replacing Browserify with Webpack and adding Babel to transpile?

@zenorocha
Copy link
Owner

Created an issue to record: #22 ;)

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.

None yet

2 participants