MCPcopy Create free account
hub / github.com/benweet/stackedit / waitForJavaScript

Function waitForJavaScript

server/pdf.js:9–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7
8/* eslint-disable no-var, prefer-arrow-callback, func-names */
9function waitForJavaScript() {
10 if (window.MathJax) {
11 // Amazon EC2: fix TeX font detection
12 MathJax.Hub.Register.StartupHook('HTML-CSS Jax Startup', function () {
13 var htmlCss = MathJax.OutputJax['HTML-CSS'];
14 htmlCss.Font.checkWebFont = function (check, font, callback) {
15 if (check.time(callback)) {
16 return;
17 }
18 if (check.total === 0) {
19 htmlCss.Font.testFont(font);
20 setTimeout(check, 200);
21 } else {
22 callback(check.STATUS.OK);
23 }
24 };
25 });
26 MathJax.Hub.Queue(function () {
27 window.status = 'done';
28 });
29 } else {
30 setTimeout(function () {
31 window.status = 'done';
32 }, 2000);
33 }
34}
35/* eslint-disable no-var, prefer-arrow-callback, func-names */
36
37const authorizedPageSizes = [

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected