-
Notifications
You must be signed in to change notification settings - Fork 919
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
Proposal: have webview_unbind return the arg #730
Comments
We are trying to preserve maximum backwards compatibility, but I think we can consider changing |
I think there is a vague idea that the webview API functions shouldn't return anything in most cases (besides |
@justjosias In this case, I think it should return the argument. For example, if a programmer |
@dandeto I agree. That behavior does seem more intuitive. I'm just thinking about API consistency and backwards compatibility. Do you have any thoughts there? |
@justjosias In this case, I think changing from |
Oh, as far as consistency goes, I think the |
Currently, if a wrapper library needs to allocate extra memory for a bound function argument (eg. to store the function closure, or to store extra arguments), it has three options for handing unbinding:
Instead of these, it would be nice to be able to use webview's internal datastructures to track this instead, by having
webview_unbind
return the stored argument.I'm not sure of webview's policy on API compatibility, so perhaps a more backwards-compatible approach would be preferable - in that case, a
webview_get_binding
or similar could be added that returns the bound arg and/or function for a name.The text was updated successfully, but these errors were encountered: