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
Seventh composite pull request #86
Conversation
ce80aa6
to
19a1063
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one thing on how to improve an each
implementation, otherwise 👍
opal/browser/form_data.rb
Outdated
hash = {} | ||
%x{ | ||
for (var pair of #@native.entries()) { | ||
#{hash[`pair[0]`] = `pair[1]`} | ||
} | ||
} | ||
hash.each(&block) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're iterating we could just yield the two pairs without creating a supporting hash, that way we'd also get the advantage of supporting duplicate keys (which are a thing IIRC)
Of the things that I want to document, maybe this should first come to mind:
In general I develop opal-browser while developing an application, so those features come as what I miss while developing it.