In main.js I am opening a tab and attaching a script with page-mod. The html file that is being opened it has a bunch of regular includes.
Sort of have two issues.
- The script from page mod does not get attached until after those other scripts are loaded, and also
- the regular scripts can't access variables defined in the script that is attached with page mod.