src/LiveDevelopment/LiveDevelopment.js
function _doLaunchAfterServerReady(initialDoc) {
        // update status
        _setStatus(STATUS_CONNECTING);
        _createLiveDocumentForFrame(initialDoc);

        // start listening for requests
        _server.start();

        // Install a one-time event handler when connected to the launcher page
        Inspector.one("connect", _onConnect);

        // open browser to the interstitial page to prepare for loading agents
        _openInterstitialPage();

        // Once all agents loaded (see _onInterstitialPageLoad()), begin Live Highlighting for preprocessor documents
        _openDeferred.done(function () {
            // Setup activeEditorChange event listener so that we can track cursor positions in
            // CSS preprocessor files and perform live preview highlighting on all elements with
            // the current selector in the preprocessor file.
            EditorManager.on("activeEditorChange", onActiveEditorChange);

            // Explicitly trigger onActiveEditorChange so that live preview highlighting
            // can be set up for the preprocessor files.
            onActiveEditorChange(null, EditorManager.getActiveEditor(), null);
        });
    }
function _doLaunchAfterServerReady(initialDoc) {
        // update status
        _setStatus(STATUS_CONNECTING);
        _createLiveDocumentForFrame(initialDoc);

        // start listening for requests
        _server.start();

        // Install a one-time event handler when connected to the launcher page
        Inspector.one("connect", _onConnect);

        // open browser to the interstitial page to prepare for loading agents
        _openInterstitialPage();

        // Once all agents loaded (see _onInterstitialPageLoad()), begin Live Highlighting for preprocessor documents
        _openDeferred.done(function () {
            // Setup activeEditorChange event listener so that we can track cursor positions in
            // CSS preprocessor files and perform live preview highlighting on all elements with
            // the current selector in the preprocessor file.
            EditorManager.on("activeEditorChange", onActiveEditorChange);

            // Explicitly trigger onActiveEditorChange so that live preview highlighting
            // can be set up for the preprocessor files.
            onActiveEditorChange(null, EditorManager.getActiveEditor(), null);
        });
    }
function _doLaunchAfterServerReady ( initialDoc ) { // update status _setStatus ( STATUS_CONNECTING ) ; _createLiveDocumentForFrame ( initialDoc ) ; // start listening for requests _server . start ( ) ; // Install a one-time event handler when connected to the launcher page Inspector . one ( "connect" , _onConnect ) ; // open browser to the interstitial page to prepare for loading agents _openInterstitialPage ( ) ; // Once all agents loaded (see _onInterstitialPageLoad()), begin Live Highlighting for preprocessor documents _openDeferred . done ( function ( ) { // Setup activeEditorChange event listener so that we can track cursor positions in // CSS preprocessor files and perform live preview highlighting on all elements with // the current selector in the preprocessor file. EditorManager . on ( "activeEditorChange" , onActiveEditorChange ) ; // Explicitly trigger onActiveEditorChange so that live preview highlighting // can be set up for the preprocessor files. onActiveEditorChange ( null , EditorManager . getActiveEditor ( ) , null ) ; } ) ; }
helper function that actually does the launch once we are sure we have a doc and the server for that doc is up and running.
helper function that actually does the launch once we are sure we have a doc and the server for that doc is up and running .