single

webix.single(source)

webix.single helper.

Please look into the linked official documentation.

External references

Official documentation page.

Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
webix.single = function(source){
    var instance = null;
    var t = function(config){
        if (!instance)
            instance = new source({});

        if (instance._reinit)
            instance._reinit.apply(instance, arguments);
        return instance;
    };
    return t;
};