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
Right now it looks like a Backbone.View doesn't support binding namespaced events to this.el because of the eventSplitter regexp: /^(\w+)\s*(.*)$/
this.el
eventSplitter
/^(\w+)\s*(.*)$/
For example, I want to bind my view to end.pjax:
end.pjax
class MyView extends Backbone.View events: 'end.pjax': 'hideLoader' hideLoader: -> this.$('.context-loader').hide()
The above won't work because the regexp splits up end and pjax:
end
pjax
> "end.pjax".match(/^(\w+)\s*(.*)$/) [ 'end.pjax', 'end', '.pjax', index: 0, input: 'end.pjax' ]
Is this a bug, or is there a reason dots aren't allowed in that regexp? Or am I just doing it wrong.
The text was updated successfully, but these errors were encountered:
Patch if this is unintentional: https://github.com/defunkt/backbone/commit/patch-1
Sorry, something went wrong.
Issue #366, support for namespaced events.
e8476af
As discussed over on the other commit -- there's a patch + test. Closing the ticket.
No branches or pull requests
Right now it looks like a Backbone.View doesn't support binding namespaced events to
this.el
because of theeventSplitter
regexp:/^(\w+)\s*(.*)$/
For example, I want to bind my view to
end.pjax
:The above won't work because the regexp splits up
end
andpjax
:Is this a bug, or is there a reason dots aren't allowed in that regexp? Or am I just doing it wrong.
The text was updated successfully, but these errors were encountered: