html.addMeta

webix.html.addMeta(name, value)

webix.html.addMeta helper.

Please look into the linked official documentation.

References

helpers
event(), isUndefined().

Referenced by

helpers
fullScreen().

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
webix.html.addMeta = function(name, value){
    document.getElementsByTagName('head').item(0).appendChild(webix.html.create("meta",{
        name:name,
        content:value
    }));

};

(function(){

var orientation = function(){
    var new_orientation = !!(window.orientation%180);
    if (webix.ui.orientation === new_orientation) return;
    webix.ui.orientation = new_orientation;
    webix.callEvent("onRotate", [new_orientation]);
};
if(webix.env.touch){
    webix.ui.orientation = !!((webix.isUndefined(window.orientation)?90:window.orientation)%180);
    webix.event(window, ("onorientationchange" in window ?"orientationchange":"resize"), orientation);
}


if(webix.env.isFF && window.matchMedia){
    window.matchMedia("(orientation: portrait)").addListener(function() {webix.ui.orientation = false; });
    window.matchMedia("(orientation: landscape)").addListener(function() { webix.ui.orientation = true; });
}