loadJS Method

Summary

Helper method to dynamically load a JS file and add it to the script section of the current document.

Syntax

JavaScript Syntax
loadJS = function( 
   fileName, 
   callback 
) 
TypeScript Syntax
static loadJS( 
   fileName: string, 
   callback: Function 
): void; 

Parameters

fileName

Path to the JS file to load.

callback

Function to call when the JS file has been loaded.

Remarks

This method works by enumerating the script tags in the current document for a matching fileName, if the item is not found then it is inserted in the document. If the item is found, then nothing is done.

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools Assembly