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

using the xhr option in an HTTP.put #66

Closed
catmando opened this issue Jan 9, 2015 · 3 comments
Closed

using the xhr option in an HTTP.put #66

catmando opened this issue Jan 9, 2015 · 3 comments

Comments

@catmando
Copy link
Contributor

catmando commented Jan 9, 2015

Not at all sure how to do this...
I am trying to add an XHR call back to an "Opal-JQuery" HTTP.put method call.

Its not clear what goes in the XHR option. In jQuery its a function that will create and return the XHR object.

Not clear what to do when doing this with opal.

For example HTTP.put("my.big.url", xhr: what_goes_here)

I have tried various options and looked through the code... I can't figure it out.

@catmando
Copy link
Contributor Author

Figured it out:

xhr: works with lambda only.

lambdas have to_n implemented, but methods do not, so doing an xhr: lambda { ... } works but xhr: method(:foo) does not.

will update docs and do a pull request

@elia
Copy link
Member

elia commented Jan 12, 2015

great :)

@elia
Copy link
Member

elia commented Jul 31, 2015

I think this is closed by dc644be 😉

@elia elia closed this as completed Jul 31, 2015
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

No branches or pull requests

2 participants