Options
All
  • Public
  • Public/Protected
  • All
Menu

Script on Demand (SOD)

Hierarchy

  • ISOD

Index

Methods

execute

  • execute(key: string, functionName: string, ...args: any[]): any
  • Executes the specified function in the specified file with the optional arguments.

    Parameters

    • key: string

      The name of the file containing the JavaScript function.

    • functionName: string

      The function to execute.

    • Rest ...args: any[]

      The optional arguments to the function.

    Returns any

executeFunc

  • executeFunc(key: string, functionName: string, fn: Function): any
  • Ensures that the specified file that contains the specified function is loaded and then runs the specified callback function.

    Parameters

    • key: string

      The name of the file containing the function that is executed.

    • functionName: string

      The name of the function that is executed.

    • fn: Function

      The function that is called once functionName has finished executing.

    Returns any

executeOrDelayUntilEventNotified

  • executeOrDelayUntilEventNotified(func: Function, eventName: string): any
  • Executes the specified function if the specified event has occurred; otherwise, adds the function to the pending job queue.

    Parameters

    • func: Function

      The function to execute.

    • eventName: string

      The name of the event.

    Returns any

executeOrDelayUntilScriptLoaded

  • executeOrDelayUntilScriptLoaded(func: Function, depScriptFileName: string): any
  • Executes the specified function if the file containing it is loaded; otherwise, adds it to the pending job queue.

    Parameters

    • func: Function

      The function to execute.

    • depScriptFileName: string

      The name of the file containing the function.

    Returns any

notifyEventAndExecuteWaitingJobs

  • notifyEventAndExecuteWaitingJobs(eventName: string): any
  • Records the event and executes any jobs in the pending job queue that are waiting on the event.

    Parameters

    • eventName: string

      The name of the event.

    Returns any

notifyScriptLoadedAndExecuteWaitingJobs

  • notifyScriptLoadedAndExecuteWaitingJobs(scriptFileName: string): any
  • Records that the script file is loaded and executes any jobs in the pending job queue that are waiting for the script file to be loaded.

    Parameters

    • scriptFileName: string

      The name of the script file.

    Returns any

registerSod

  • registerSod(key: string, url: string): any
  • Registers the specified file at the specified URL.

    Parameters

    • key: string

      The name of the file to register.

    • url: string

      The relative (to the server root) URL of the file.

    Returns any

registerSodDep

  • registerSodDep(key: string, dep: string): any
  • Registers the specified file as a dependency of another file.

    Parameters

    • key: string

      The name of the file to which the other file is dependent.

    • dep: string

      The name of the dependent file.

    Returns any

Generated using TypeDoc