Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit d1376c3

Browse files
committed
refactor(framework): remove nomodule lib ref
1 parent 8e90ca8 commit d1376c3

File tree

1 file changed

+41
-40
lines changed

1 file changed

+41
-40
lines changed

framework/core/nomodule.ts

Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,41 @@
1-
/// <reference lib="dom" />
2-
var el = document.createElement('div')
3-
var hEl = document.createElement('h2')
4-
var pEl = document.createElement('p')
5-
var style: Partial<CSSStyleDeclaration> = {
6-
position: 'fixed',
7-
top: '0',
8-
left: '0',
9-
zIndex: '999',
10-
width: '100%',
11-
margin: '0',
12-
padding: '24px 0',
13-
lineHeight: '1.5',
14-
fontSize: '14px',
15-
color: '#666',
16-
backgroundColor: '#fff9cc',
17-
textAlign: 'center',
18-
boxShadow: '0 1px 5px rgba(0,0,0,0.1)'
19-
}
20-
var hStyle: Partial<CSSStyleDeclaration> = {
21-
margin: '0',
22-
padding: '0',
23-
lineHeight: '1.2',
24-
fontSize: '24px',
25-
fontWeight: '700',
26-
color: '#000',
27-
}
28-
for (var key in style) {
29-
(el.style as any)[key] = style[key]
30-
}
31-
for (var key in hStyle) {
32-
(hEl.style as any)[key] = hStyle[key]
33-
}
34-
// todo: i18n
35-
// todo: add browser info
36-
hEl.innerText = 'Your browser is out of date.'
37-
pEl.innerHTML = 'Aleph.js requires <a href="https://caniuse.com/es6-module" style="font-weight:500;color:#000;">ES module</a> support during development.'
38-
el.appendChild(hEl)
39-
el.appendChild(pEl)
40-
document.body.appendChild(el)
1+
(function (document: any) {
2+
var contarinEl = document.createElement('div')
3+
var hEl = document.createElement('h2')
4+
var pEl = document.createElement('p')
5+
var style: Record<string, string> = {
6+
position: 'fixed',
7+
top: '0',
8+
left: '0',
9+
zIndex: '999',
10+
width: '100%',
11+
padding: '24px 0',
12+
margin: '0',
13+
lineHeight: '1.5',
14+
fontSize: '14px',
15+
color: '#666',
16+
backgroundColor: '#fff9cc',
17+
textAlign: 'center',
18+
boxShadow: '0 1px 5px rgba(0,0,0,0.1)'
19+
}
20+
var hStyle: Record<string, string> = {
21+
padding: '0',
22+
margin: '0',
23+
lineHeight: '1.2',
24+
fontSize: '24px',
25+
fontWeight: '700',
26+
color: '#000',
27+
}
28+
for (var key in style) {
29+
contarinEl.style[key] = style[key]
30+
}
31+
for (var key in hStyle) {
32+
hEl[key] = hStyle[key]
33+
}
34+
// todo: i18n
35+
// todo: add browser info
36+
hEl.innerText = 'Your browser is out of date.'
37+
pEl.innerHTML = 'Aleph.js requires <a href="https://caniuse.com/es6-module" style="font-weight:500;color:#000;">ES module</a> support during development.'
38+
contarinEl.appendChild(hEl)
39+
contarinEl.appendChild(pEl)
40+
document.body.appendChild(contarinEl)
41+
})((window as any).document)

0 commit comments

Comments
 (0)