mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	zjquery: Add prop() function.
This commit is contained in:
		@@ -14,6 +14,7 @@ exports.make_zjquery = function () {
 | 
			
		||||
        var focused = false;
 | 
			
		||||
        var children = new Dict();
 | 
			
		||||
        var my_parent;
 | 
			
		||||
        var properties = new Dict();
 | 
			
		||||
        var classes = new Dict();
 | 
			
		||||
        var on_functions = new Dict();
 | 
			
		||||
 | 
			
		||||
@@ -128,6 +129,12 @@ exports.make_zjquery = function () {
 | 
			
		||||
                assert.equal(idx, 0);
 | 
			
		||||
                return selector;
 | 
			
		||||
            },
 | 
			
		||||
            prop: function (name, val) {
 | 
			
		||||
                if (val === undefined) {
 | 
			
		||||
                    return properties.get(name);
 | 
			
		||||
                }
 | 
			
		||||
                properties.set(name, val);
 | 
			
		||||
            },
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
        if (selector[0] === '<') {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user