1
0
-1

Whats the best practice for including Javascript libraries in Maestro?


I'm trying to include a few libraries to be used in onload and pagechange rules but when they are included (via the Javascript Library Component) I get:

Uncaught Error: Mismatched anonymous define()


I believe this is due to requireJS expecting the library to be included 'the require way'.

I have a hack-around that can 'solve' it but it requires making changes to each library (less-than-ideal).


Any ideas, Maestro Maestros?

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi Dylan,

      You could create a native component and make your 3rd-party libraries a dependency of the component.

      See Creating Maestro Native Components for details.  The sample component shows how to include a JQuery plugin as a dependency.

      Keep in mind that not all 3rd party JavaScript libraries are compatible with require/define module loaders.

        CommentAdd your comment...