mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	zjquery: Add get_on_handler().
This commit is contained in:
		
				
					committed by
					
						
						Steve Howell
					
				
			
			
				
	
			
			
			
						parent
						
							641b38f79b
						
					
				
				
					commit
					9c90a3d1a3
				
			@@ -86,6 +86,11 @@ exports.make_zjquery = function () {
 | 
			
		||||
                assert.equal(idx, 0);
 | 
			
		||||
                return selector;
 | 
			
		||||
            },
 | 
			
		||||
            get_on_handler: function (name, child_selector) {
 | 
			
		||||
                var funcs = self.get_on_handlers(name, child_selector);
 | 
			
		||||
                assert.equal(funcs.length, 1, 'We expected to have exactly one handler here.');
 | 
			
		||||
                return funcs[0];
 | 
			
		||||
            },
 | 
			
		||||
            get_on_handlers: function (name, child_selector) {
 | 
			
		||||
                if (child_selector === undefined) {
 | 
			
		||||
                    return on_functions.get(name) || [];
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user