forked from speced/respec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathw3c-common.js
107 lines (103 loc) · 3.31 KB
/
w3c-common.js
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/**
* The w3c-common profile is DEPRECATED.
* Update (Apr 15, 2020): The w3c-common profile will no longer receive updates.
* It is frozen at v25.5.0.
*
* The difference between w3c-common and the w3c profile
* is that this profile includes jQuery to support legacy
* specs.
*
* However, you are strongly discouraged from using
* jQuery. Please use vanilla JS/DOM instead:
*
* http://youmightnotneedjquery.com
*
* If you need help, reach out to the ReSpec maintainers.
*/
"use strict";
// In case everything else fails, we want the error
window.addEventListener("error", ev => {
console.error(ev.error, ev.message, ev);
});
const modules = [
// order is significant
import("../src/core/base-runner.js"),
import("../src/core/ui.js"),
import("../src/core/jquery-enhanced.js"),
import("../src/core/location-hash.js"),
import("../src/core/l10n.js"),
import("../src/w3c/defaults.js"),
import("../src/core/style.js"),
import("../src/w3c/style.js"),
import("../src/w3c/l10n.js"),
import("../src/core/github.js"),
import("../src/core/data-include.js"),
import("../src/core/markdown.js"),
import("../src/core/reindent.js"),
import("../src/core/title.js"),
import("../src/w3c/level.js"),
import("../src/w3c/headers.js"),
import("../src/w3c/abstract.js"),
import("../src/core/data-transform.js"),
import("../src/core/data-abbr.js"),
import("../src/core/inlines.js"),
import("../src/w3c/conformance.js"),
import("../src/core/dfn.js"),
import("../src/core/pluralize.js"),
import("../src/core/examples.js"),
import("../src/core/issues-notes.js"),
import("../src/core/best-practices.js"),
import("../src/core/figures.js"),
import("../src/core/webidl.js"),
import("../src/core/biblio.js"),
import("../src/core/link-to-dfn.js"),
import("../src/core/xref.js"),
import("../src/core/data-cite.js"),
import("../src/core/webidl-index.js"),
import("../src/core/render-biblio.js"),
import("../src/core/dfn-index.js"),
import("../src/core/contrib.js"),
import("../src/core/fix-headers.js"),
import("../src/core/structure.js"),
import("../src/core/informative.js"),
import("../src/core/id-headers.js"),
import("../src/core/caniuse.js"),
import("../src/core/mdn-annotation.js"),
import("../src/ui/save-html.js"),
import("../src/ui/search-specref.js"),
import("../src/ui/about-respec.js"),
import("../src/core/seo.js"),
import("../src/w3c/seo.js"),
import("../src/core/highlight.js"),
import("../src/core/webidl-clipboard.js"),
import("../src/core/data-tests.js"),
import("../src/core/list-sorter.js"),
import("../src/core/highlight-vars.js"),
import("../src/core/dfn-panel.js"),
import("../src/core/data-type.js"),
import("../src/core/algorithms.js"),
import("../src/core/anchor-expander.js"),
import("../src/core/custom-elements/index.js"),
/* Linter must be the last thing to run */
import("../src/core/linter.js"),
import("../src/core/a11y.js"),
];
async function domReady() {
if (document.readyState === "loading") {
await new Promise(resolve =>
document.addEventListener("DOMContentLoaded", resolve)
);
}
}
(async () => {
const [runner, { ui }, ...plugins] = await Promise.all(modules);
try {
ui.show();
await domReady();
await runner.runAll(plugins);
} finally {
ui.enable();
}
})().catch(err => {
console.error(err);
});