add site-wide JS caching through import maps
This commit is contained in:
parent
f3aee8f41a
commit
10ccb250c1
15 changed files with 169 additions and 48 deletions
|
@ -17,21 +17,6 @@ export const domConsole = {
|
|||
}
|
||||
};
|
||||
|
||||
async function withTemporaryGlobalScope(callback) {
|
||||
let state = {
|
||||
oldValues: {},
|
||||
set(key, value) {
|
||||
this.oldValues[key] = globalThis[key];
|
||||
globalThis[key] = value;
|
||||
}
|
||||
};
|
||||
await callback(state);
|
||||
jsConsole.trace(state.oldValues, "bringing back old state");
|
||||
for (let key in state.oldValues) {
|
||||
globalThis[key] = state.oldValues[key];
|
||||
}
|
||||
}
|
||||
|
||||
let evaluationComplete = null;
|
||||
|
||||
export async function evaluate(commands, { error, newOutput }) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue