This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let counter = 0; | |
let scriptMap = new Map(); | |
export const ScriptCache = (function(global) { | |
return function ScriptCache (scripts) { | |
const Cache = {}; | |
Cache._onLoad = function(key) { | |
return (cb) => { | |
let stored = scriptMap.get(key); |