Any ideas why adding localforage to rpg_managers.js and index.html cause game not to load

Can anyone from RPG Maker MV or the community who knows about rpg_managers.js speak technical details as to why after making the edits to the rpg_managers.js file and index.html file as shown in the diff checker links below, the game does not load and instead presents a black screen? I am trying to better understand what is actually happening and am hoping some knowledgeable folks can point me in the right direction.

Here are the changes I made to the Index.html code -- https://www.diffchecker.com/NfAauTyk

Here are the changes I made to the rpg_managers.js code -- https://www.diffchecker.com/CCicIznJ

If I just set up a plain vanilla web page, I can get localforage-cordovasqlitedriver working fine - point being that all my script references are correct on index.html.

Since localforage-cordovasqlitedriver is asynchronous the only way to implement it is to integrate it into rpg_managers.js as I have done but that integration breaks the game by preventing it from loading up at the start.

Can anyone provide some insight into why this might happen and how I might get around it? Or can anyone suggest or instruct me on how I might go about debugging this to get at the root cause of it?

I need to find a way to use localforage-sqlitedriver for mobile. It be great if that would be built into a future version of the engine as an option because localstorage is undesirable.

I have a feeling I need to better understand how the objects load from the index.html page to know where to go from here to try and get it implemented.

If anyone has any insight or suggestions that would be fantastic.
Usually you get told what's wrong if you open the dev tools. To me it looks like you've misplaced the scripts though.

EDIT: Nevermind. You're using await inside synchronous functions. That is not doable and will result in crash.
Thanks. Seems we will need to keep converting code further up the chain.

Original thread: https://forums.rpgmakerweb.com/threads/any-ideas-why-adding-localforage-to-rpg_managers-js-and-index-html-cause-game-not-to-load.111906/