single

implements the singleton pattern

function single(function source);
sourcefunctionthe constructor function
functionthe constructor function

Example

var myobj = function(){ ... };
myobj = webix.single(myobj);
 
var t1 = new myobj();
var t2 = new myobj(); //t2 === t1

Back to top
Join Our Forum
We've retired comments here. Visit our forum for faster technical support, connect with other developers, and share your feedback there.