-
Notifications
You must be signed in to change notification settings - Fork 18
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
Undocumented dependency on JQuery? #22
Comments
@davidmegginson are you using this from browser or node? In node should not require jquery. |
@rgrp I was using it in-browser, for a client-only app. If that's the only JQuery dependency, then it might make sense to add a couple of extra lines of Javascript to do AJAX the old-fashioned way, and make the library standalone. |
@davidmegginson that's definitely a thought :-) - only trouble is that can be a little bit painful (e.g. if you need to add auth headers etc). What's definitely missing right now is a something in the README about needing jquery - if you have a suggestion there please open a pull request or we can add it at our end :-) Thanks for flagging this! |
I don't think this library should depend on jquery. Maybe there are smaller libraries made just for that purpose (AJAX). |
@loleg yes we can completely remove and also happy for us to use what is in people's stack - if there is a clean way to do that. |
On further thought, superagent is the only modern library with JSONP support (albeit undocumented), the reason I've been continuing to use jQuery in ckan-embed. Would it potentially make sense to abstract away the HTTP request, so the library user can plug in whatever they want, with perhaps just a sensible default? If anyone with experience in the various options out there can weigh in here, please do. |
@loleg happy for you to lead here and make a proposal - if superagent seems good to you happy to go for that. |
Readme.md doesn't mention a JQuery dependency, but the library is failing when I don't have JQuery loaded.
The text was updated successfully, but these errors were encountered: