Open slavchev opened 8 months ago
Thank you for the report. We are currently undertaking this very issue and working to remove all dependencies on the window so that these will go away. It is a sizeable project that we hope to have publicly available in the next quarter.
Feature request
We use daily-js in Cordova app and during initial prototyping we got the following error (sorry about the bad formatting)
The error was due to our use of https://www.npmjs.com/package/cordova-plugin-purchase which uses default clobber
store
. While it was trivial to fix it, it was unexpected and at least to my knowledge undocumented (compared to cordova-plugin-purchase which is well documented). Also it is hard to reason over call-machine-object-bundle.js as it is minified. So far it seemsplaceDailyContextOnWindow()
sets the following global propertiesAs my current understanding is that call-machine-object-bundle.js is an internal library I would suggest to keep global namespace as less polluted as possible, maybe use double underscore prefix or just a single object, e.g.
__dailyjs
that holds all needed properties.Why you need this
This feature will provide better software compatibility.
Alternatives you've considered
Maybe providing a simple documentation what global properties daily-js uses will be enough.
Additional context