@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
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
I find it interesting that the two method signatures below are not equivalent.
Method 1: passing a
Falsy selectorMethod 2: passing
no selectorThe 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