-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
47 lines (35 loc) · 819 Bytes
/
main.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
"use strict";
function loadCss ( name )
{
if (!document.getElementById(name))
{
let link = document.createElement('link');
link.id = name;
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = name;
link.media = 'all';
document.head.appendChild(link);
}
}
// M a i n
//
function main ( )
{
console.clear();
loadCss( "Console.css" );
loadCss( "Window.css" );
let w = new Window( { title:"<b>Console</b>",
left:"100px",
top:"100px",
width:"600px",
height:"300px" } );
let d = document.createElement("div");
d.id = "console";
w.setChild(d);
document.body.appendChild( w.div );
console.redirect(d);
document.body.appendChild( new Window({ title:"Window 1" }).div );
}
loadScripts(["Console.js",
"Window.js"], main);