• Includes a JS file. Uses window.eval(), so that the content is executed in the 'window' context and also immediatelly available for the following code. '.js' extension isn't necessary and is added if missing. Duplicates (including those from <script> tag) are automatically ignored.

    Parameters

    • files: string | string[]

      File or a list of files to be included

    • Optional callback: callback

      Function to be called when the inclusion is complete

    • Optional isolate: boolean

      Indicates whether the script code should be loaded as isolated, so that its global variables don't interfere with other scripts (useful for custom scripts)

    • Optional local: string
    • Optional reload: boolean

    Returns any

    Method

    requirejs