destructors

webix.destructors([see official doc])

webix.destructors 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
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
webix.destructors = [];
webix.event(window,"unload",function(){
    webix.callEvent("unload", []);
    webix._final_destruction = true;

    //call all registered destructors
    for (var i=0; i<webix.destructors.length; i++){
        var obj = webix.destructors[i].obj;
        if (obj)
            obj.destructor();
    }
    webix.destructors = [];
    webix.ui._popups = webix.toArray();

    //detach all known DOM events
    for (var a in webix._events)
        webix.eventRemove(a);
});

/*
    Behavior:Settings

    @export
        customize
        config
*/

/*
    Template - handles html templates
*/



(function(){

var _cache = {};
var _csp_cache = {};
var newlines = new RegExp("(\\r\\n|\\n)","g");
var quotes   = new RegExp("(\\\")","g");
var slashes  = new RegExp("(\\\\)","g");
var escape = {
  "&": "&amp;",
  "<": "&lt;",
  ">": "&gt;",
  '"': "&quot;",
  "'": "&#x27;",
  "`": "&#x60;"
};
var badChars = /[&<>"'`]/g;
var escapeChar = function(chr) {
  return escape[chr] || "&amp;";
};