-
Notifications
You must be signed in to change notification settings - Fork 63
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
Element[n] throws TypeError #47
Comments
I see, the reason for this is that #[key] gives you access to an element's attributes. Could there be a better way to avoid the inconsistencies between Array-like behavior with #at and Hash-like behavior with #[]? |
I remember it has been discussed. iirc we picked the 80% case (which is attr) and made array access more explicit (#at) or available after conversion with #to_a |
Okay, that makes sense. Then the problem that remains is that there is no documentation on this. The Github readme links to http://opalrb.org/jquery but that page doesn't exist. |
Sure! Recently I started publishing opal side API docs (http://opalrb.org/docs/api/). Currently there's just core and stdlib but my plan is to publish there docs for all opal libs (a la rdoc.info) You can grab the rails task from opal-master. Let me know if you need anything, some help is really appreciated :) |
Closing, I'll be glad to merge PRs improving api documentation, that would be enough (I'll deal with generating yardocs myself) |
I expected the equivalent of JQuery's .eq(n) to be #[n] in opal-jquery.
However, only .at(n) seems to work at the moment and #[n] throws a TypeError:
For your convenience, the code on opalrb.org/try: http://ur1.ca/i454e
The text was updated successfully, but these errors were encountered: