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
Add StopPropagation for events #45
Conversation
LGTM, but people more familiar with this project should decide if this is in scope. |
@@ -113,6 +114,14 @@ func (l *EventListener) PreventDefault() *EventListener { | |||
return l | |||
} | |||
|
|||
// StopPropagation prevents further propagation of the current event in the capturing and bubbling phases. |
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.
(nit) prefer to wrap this at 80 chars
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 curious, is that your personal preference, or do you think that it's best practice (listed somewhere else)?
I agree for this comment, because it's top level, that it's nicer to wrap it to 80-100~ish column lines (which is optimal width for reading).
But there are other comment types that provide very specific detail, like inline notes, that I don't mind keeping very long and single-line. That way they're out of sight except when you really need to read about that particular detail. Here's an example of what I mean. Disclaimer: I use a computer where I can scroll horizontally as easily as I can scroll vertically.
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 curious, is that your personal preference, or do you think that it's best practice (listed somewhere else)?
I agree for this comment, because it's top level, that it's nicer to wrap it to 80-100~ish column lines (which is optimal width for reading).
I wouldn't say that "you should always use 80 chars" but I would say "as a general rule of thumb, wrap at 80 chars". In my mind, it doesn't apply to all situations but does to most (e.g. the case here).
But there are other comment types that provide very specific detail, like inline notes, that I don't mind keeping very long and single-line. That way they're out of sight except when you really need to read about that particular detail. Here's an example of what I mean. Disclaimer: I use a computer where I can scroll horizontally as easily as I can scroll vertically.
For these, I don't have too much preference. I think they are OK off to the side like this, and also OK as comments before that line wrapped at 80 chars. Both are okay in my opinion.
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.
I've been using 100 chars as a guide, but I'm perfectly happy with 80. Obviously there's times like this where breaking a comment would cause gofmt to break the nice indenting.
LGTM except one minor comment |
Done. |
LGTM |
No description provided.