I am currently working on developing a custom Javascript widget that requires users to insert specific lines of code into their web pages. This code will then dynamically add an externally hosted javascript file, allowing me to inject HTML content onto the page using Angular Material Library.
As I proceed with this project, several questions have come up:
- What is the best approach for accomplishing this task? Does anyone have a useful tutorial to recommend?
- Is it feasible to include external stylesheets and scripts within the widget as well?
- How can I prevent conflicts with existing global objects on the user's website?