-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathtea_html_cmds.js
More file actions
30 lines (27 loc) · 967 Bytes
/
tea_html_cmds.js
File metadata and controls
30 lines (27 loc) · 967 Bytes
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
// Generated by BUCKLESCRIPT VERSION 2.2.3, PLEASE EDIT WITH CARE
'use strict';
var Block = require("bs-platform/lib/js/block.js");
function focus(id) {
return /* EnqueueCall */Block.__(2, [(function () {
var match = document.getElementById(id);
if (match == null) {
console.log(/* tuple */[
"Attempted to focus a non-existant element of: ",
id
]);
return /* () */0;
} else {
var ecb = function () {
return match.focus();
};
var cb = function () {
window.requestAnimationFrame(ecb);
return /* () */0;
};
window.requestAnimationFrame(cb);
return /* () */0;
}
})]);
}
exports.focus = focus;
/* No side effect */