aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Scripts/main.js
blob: c43e0e272dae45da9b65692aeadd430f2f5b8bcb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
(async function () {
    await CefSharp.BindObjectAsync("boundAsync", "bound");

    var inputs = document.getElementsByTagName('input');
    var i = 0;

    do {

        var type = inputs[i].type;

        if (type == 'text' || type == 'email' || type == 'password' || type == 'search' || type == 'date' || type == 'url' || type == 'time' || type == 'tel' || type == 'number') {
            inputs[i].onfocus = function () {
                boundAsync.openKeyboard(type);
            }
            inputs[i].onblur = function () {
                boundAsync.closeKeyboard();
            }
        }
    }
    while (inputs[++i])
})();