• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

naver / billboard.js / 5829678459

pending completion
5829678459

push

github

web-flow
chore(build): Rename plugin packaged file name (#3335)

- Set plugin dist files name to contain 'pkgd' as postfix.
- Remove '@babel/plugin-transform-block-scoping' plugin wich transpiles incorrectly

Fix #3334

5739 of 6614 branches covered (86.77%)

Branch coverage included in aggregate %.

7566 of 7934 relevant lines covered (95.36%)

20583.74 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

58.82
/src/module/browser.ts
1
/**
2
 * Copyright (c) 2017 ~ present NAVER Corp.
3
 * billboard.js project is licensed under the MIT license
4
 */
5
/**
6
 * Window object
7
 * @private
8
 */
9
/* eslint-disable no-new-func, no-undef */
10
export {
11
        win as window,
12
        doc as document,
13
        requestAnimationFrame, cancelAnimationFrame,
14
        requestIdleCallback, cancelIdleCallback
15
};
16

17
const win = (() => {
3✔
18
        const root = (typeof globalThis === "object" && globalThis !== null && globalThis.Object === Object && globalThis) ||
3!
19
                (typeof global === "object" && global !== null && global.Object === Object && global) ||
20
                (typeof self === "object" && self !== null && self.Object === Object && self);
21

22
        return root || Function("return this")();
3!
23
})();
24
/* eslint-enable no-new-func, no-undef */
25

26
// fallback for non-supported environments
27
const hasRAF = typeof win.requestAnimationFrame === "function";
3✔
28
const hasRIC = typeof win.requestIdleCallback === "function";
3✔
29

30
const requestAnimationFrame = hasRAF ? win.requestAnimationFrame : (cb => setTimeout(cb, 1));
3!
31
const cancelAnimationFrame = hasRAF ? win.cancelAnimationFrame : (id => clearTimeout(id));
3!
32
const requestIdleCallback = hasRIC ? win.requestIdleCallback : requestAnimationFrame;
3!
33
const cancelIdleCallback = hasRIC ? win.cancelIdleCallback : cancelAnimationFrame;
3!
34

35
const doc = win?.document;
3!
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc