Skip to main content

AppInit

Import :

const AppInit = brackets.getModule("utils/AppInit")

Metrics

Defines hooks to assist with module initialization.

This module defines 3 methods for client modules to attach callbacks:

  • htmlReady - When the main application template is rendered
  • extensionsLoaded - When the extension manager has loaded all extensions
  • appReady - When Brackets completes loading all modules and extensions

These are not jQuery events. Each method is similar to $(document).ready in that it will call the handler immediately if brackets is already done loading.

Kind: global constant

HTML_READY : string

Fires when the base htmlContent/main-view.html is loaded

Kind: global constant

APP_READY : string

Fires when all extensions are loaded

Kind: global constant

EXTENSIONS_LOADED : string

Fires after extensions have been loaded

Kind: global constant

appReady(handler)

Adds a callback for the ready hook. Handlers are called after htmlReady is done, the initial project is loaded, and all extensions are loaded.

Kind: global function

ParamTypeDescription
handlerfunctioncallback function to call when the event is fired

htmlReady(handler)

Adds a callback for the htmlReady hook. Handlers are called after the main application html template is rendered.

Kind: global function

ParamTypeDescription
handlerfunctioncallback function to call when the event is fired

extensionsLoaded(handler)

Adds a callback for the extensionsLoaded hook. Handlers are called after the extensions have been loaded

Kind: global function

ParamTypeDescription
handlerfunctioncallback function to call when the event is fired