Hi everyone! I'm adding modules support to Rex_TimeAwayL plugin and I stuck into a problem. How to make the code in the localforage.js file global?
I tried to do the same as with Firebase addon (write at the beginning var localforage2=function() {code}, and at the end globalThis.localforage2 = localforage2). But when I preview addon example, project fails to load with the error that localforage2 is not defined.
In runtime files, functions from localforage look like this:
localforage2["getItem"](key, callback);
localforage2["setItem"](key, self.cache[key], onWriteTimer);
Here is code in localforage.js: pastebin.com/mrQ9H7Kp