I am trying to create a Javascript widget where in the user of the widget will have to add a couple of lines of Javascript to his page which in turn will add an externally hosted javascript to his page. Through this javascript, I'll add HTML code to his page. In this HTML, I'm using Angular Material Library.
I have a few questions:
- How should I go about this? Can someone share a link of a related tutorial?
- Is it possible to add external stylesheet and script to the widget?
- How do I avoid any conflicts with the user's own website global objects?