@on decorator behavior varies between no selector and selector="" #4158
traveller1011
started this conversation in
General
Replies: 1 comment 1 reply
-
An empty string is a valid selector, albeit one that doesn't match anything. The equivalent of no selector would be |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I find it interesting that the two method signatures below are not equivalent.
Method 1: passing a
Falsy selector
Method 2: passing
no selector
The difference
Passing a blank selector kills the event bubbling--- or otherwise results in behavior which i found "surprising". I would argue behavior should be the same in both cases, if only to safe future brain cycles answering for this oddity.
Working Example
Beta Was this translation helpful? Give feedback.
All reactions