Skip to main content
Module

x/billboardjs/module/browser.ts

πŸ“Š Re-usable, easy interface JavaScript chart library based on D3.js
Go to Latest
File
/** * Copyright (c) 2017 ~ present NAVER Corp. * billboard.js project is licensed under the MIT license *//** * Window object * @private *//* eslint-disable no-new-func, no-undef */export {win as window, doc as document};
const win = (() => { const root = (typeof globalThis === "object" && globalThis !== null && globalThis.Object === Object && globalThis) || (typeof global === "object" && global !== null && global.Object === Object && global) || (typeof self === "object" && self !== null && self.Object === Object && self);
return root || Function("return this")();})();/* eslint-enable no-new-func, no-undef */
// fallback for non-supported environmentswin.requestIdleCallback = win.requestIdleCallback || (cb => setTimeout(cb, 1));// win.cancelIdleCallback = win.cancelIdleCallback || (id => clearTimeout(id));win.requestAnimationFrame = win.requestAnimationFrame || (cb => setTimeout(cb, 1));
const doc = win?.document;