Skip to content

Commit 5484476

Browse files
committed
Add TH to browser
1 parent bd0bdbc commit 5484476

File tree

3 files changed

+32
-4
lines changed

3 files changed

+32
-4
lines changed

dist/easycoder.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5836,6 +5836,18 @@ const EasyCoder_Browser = {
58365836
}
58375837
},
58385838

5839+
TH: {
5840+
5841+
compile: (compiler) => {
5842+
compiler.compileVariable(`browser`, `th`, false, `dom`);
5843+
return true;
5844+
},
5845+
5846+
run: (program) => {
5847+
return program[program.pc].pc + 1;
5848+
}
5849+
},
5850+
58395851
TEXTAREA: {
58405852

58415853
compile: (compiler) => {
@@ -6166,6 +6178,8 @@ const EasyCoder_Browser = {
61666178
return EasyCoder_Browser.TR;
61676179
case `td`:
61686180
return EasyCoder_Browser.TD;
6181+
case `th`:
6182+
return EasyCoder_Browser.TH;
61696183
case `textarea`:
61706184
return EasyCoder_Browser.TEXTAREA;
61716185
case `trace`:
@@ -8902,12 +8916,12 @@ const EasyCoder = {
89028916
}
89038917
},
89048918
};
8905-
EasyCoder.version = `230628`;
8919+
EasyCoder.version = `240112`;
89068920
EasyCoder.timestamp = Date.now();
89078921
console.log(`EasyCoder loaded; waiting for page`);
89088922

89098923
function EasyCoder_Startup() {
8910-
console.log(`${Date.now() - EasyCoder.timestamp} ms: Page loaded; reset timer & start EasyCoder`);
8924+
console.log(`${Date.now() - EasyCoder.timestamp} ms: Start EasyCoder`);
89118925
EasyCoder.timestamp = Date.now();
89128926
EasyCoder.scripts = {};
89138927
window.EasyCoder = EasyCoder;

js/easycoder/Browser.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2456,6 +2456,18 @@ const EasyCoder_Browser = {
24562456
}
24572457
},
24582458

2459+
TH: {
2460+
2461+
compile: (compiler) => {
2462+
compiler.compileVariable(`browser`, `th`, false, `dom`);
2463+
return true;
2464+
},
2465+
2466+
run: (program) => {
2467+
return program[program.pc].pc + 1;
2468+
}
2469+
},
2470+
24592471
TEXTAREA: {
24602472

24612473
compile: (compiler) => {
@@ -2786,6 +2798,8 @@ const EasyCoder_Browser = {
27862798
return EasyCoder_Browser.TR;
27872799
case `td`:
27882800
return EasyCoder_Browser.TD;
2801+
case `th`:
2802+
return EasyCoder_Browser.TH;
27892803
case `textarea`:
27902804
return EasyCoder_Browser.TEXTAREA;
27912805
case `trace`:

js/easycoder/EasyCoder.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
EasyCoder.version = `230628`;
1+
EasyCoder.version = `240112`;
22
EasyCoder.timestamp = Date.now();
33
console.log(`EasyCoder loaded; waiting for page`);
44

55
function EasyCoder_Startup() {
6-
console.log(`${Date.now() - EasyCoder.timestamp} ms: Page loaded; reset timer & start EasyCoder`);
6+
console.log(`${Date.now() - EasyCoder.timestamp} ms: Start EasyCoder`);
77
EasyCoder.timestamp = Date.now();
88
EasyCoder.scripts = {};
99
window.EasyCoder = EasyCoder;

0 commit comments

Comments
 (0)