1
0
-1

I'm developing a native widget that draws a new type of control on the page.  The control is supplied in a third party library.  Examples from the developer's website use external references to the library using <script> to the developers CDN.  I'd also consider downloading the library and embedding it as a library resource if that was appropriate.  I have no prior example to work from.

    CommentAdd your comment...

    2 answers

    1.  
      0
      -1
      -2

      Hey Jason, I would recommend downloading and embedding the library if that is an option. 

      Loading JavaScript from remote sites is achievable but has security implications and you need to consider the Content Security Policy settings described in this article:

       

      1. Jason Hendry

        Thanks Ben, Could you let me know how to embed the JS Lib into my native Maestro component and reference it in the widget?

      CommentAdd your comment...
    2.  
      1
      0
      -1

      Jason, you can add external dependencies to your widget JavaScript file like this:

      The files will be added as <script> tags in your HTML.

        CommentAdd your comment...