We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently when we use :onXYZ:
:onXYZ
<button :onClick=".btnClicked">
The babel plugin creates a closure around view.btnClicked(e, w):
view.btnClicked(e, w)
p.__bv = function (view, prototype) { view.dom = { '_1_': view.__gw([0]).on('click', function (e, w) { view.btnClicked(e, w); }) }; };
Whereas we could cut out the closure:
p.__bv = function (view, prototype) { view.dom = { '_1_': view.__gw([0]).on('click', view.btnClicked) }; };
But we need to make sure we can still cater for arguments like a basic onClick:
<button :onClick=".btnClicked('hello')">
Perhaps conditionally determine whether this is happening and cut out the closure if not needed?
See:
redrunner/packages/babel-plugin-redrunner/lib/redrunner/syntax.js
Line 70 in a819313
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently when we use
:onXYZ
:The babel plugin creates a closure around
view.btnClicked(e, w)
:Whereas we could cut out the closure:
But we need to make sure we can still cater for arguments like a basic onClick:
Perhaps conditionally determine whether this is happening and cut out the closure if not needed?
See:
redrunner/packages/babel-plugin-redrunner/lib/redrunner/syntax.js
Line 70 in a819313
The text was updated successfully, but these errors were encountered: