UNPKG

bucklescript-tea

Version:
31 lines (27 loc) 973 B
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE 'use strict'; var Block = require("bs-platform/lib/js/block.js"); function focus(id) { return /* EnqueueCall */Block.__(2, [(function (_enqueue) { var ecb = function (param) { var match = document.getElementById(id); if (match == null) { console.log(/* tuple */[ "Attempted to focus a non-existant element of: ", id ]); return /* () */0; } else { return match.focus(); } }; var cb = function (param) { window.requestAnimationFrame(ecb); return /* () */0; }; window.requestAnimationFrame(cb); return /* () */0; })]); } exports.focus = focus; /* No side effect */