Firefox offers two functions that enable functionality and/or objects present in a content script to be exposed in a controlled fashion to a webpage.
This mechanism keeps the security separation between the webpage and content script, while allowing webpages to access functionality defined in a web extension.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Sharing_objects_with_page_scripts#exportfunction
Standardise this (or a suitable variation) for all browsers.
Firefox offers two functions that enable functionality and/or objects present in a content script to be exposed in a controlled fashion to a webpage.
This mechanism keeps the security separation between the webpage and content script, while allowing webpages to access functionality defined in a web extension.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Sharing_objects_with_page_scripts#exportfunction
Standardise this (or a suitable variation) for all browsers.