Don’t worry, we can fix this easily.
You are obviously not injecting the polyfill with your content scripts.
For example:
window.onload = (event) => { // https://developer.mozilla.org/en-US/docs/Web/API/Window/load_event
browser.tabs.executeScript({file: "../content_scripts/create_total_cards_button.js"});
};
You can change it into something like this:
window.onload = async event => { // https://developer.mozilla.org/en-US/docs/Web/API/Window/load_event
await browser.tabs.executeScript({file: "/browser-polyfill.min.js"});
await browser.tabs.executeScript({file: "/content_scripts/create_total_cards_button.js"});
};
Note that I made it async so that I can await the polyfill injection.
Also, regarding the script injection, use the “/” in the beginning, it’s also mentioned in the docs: