From 7e3b1b162a7224d35c2c1145602bdb9201a32c8d Mon Sep 17 00:00:00 2001 From: Saurabh Kathpalia Date: Tue, 4 Jul 2017 15:42:33 +0530 Subject: [PATCH] Fixed reverse highlight in Multibrowser Live Preview --- src/LiveDevelopment/LiveDevMultiBrowser.js | 3 ++- .../MultiBrowserImpl/protocol/LiveDevProtocol.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/LiveDevelopment/LiveDevMultiBrowser.js b/src/LiveDevelopment/LiveDevMultiBrowser.js index 3582ea7f91f..bb3051e6293 100644 --- a/src/LiveDevelopment/LiveDevMultiBrowser.js +++ b/src/LiveDevelopment/LiveDevMultiBrowser.js @@ -815,7 +815,8 @@ define(function (require, exports, module) { /** * Initialize the LiveDevelopment module. */ - function init() { + function init(config) { + exports.config = config; MainViewManager .on("currentFileChange", _onFileChange); DocumentManager diff --git a/src/LiveDevelopment/MultiBrowserImpl/protocol/LiveDevProtocol.js b/src/LiveDevelopment/MultiBrowserImpl/protocol/LiveDevProtocol.js index 159d16ec5d6..b8624131853 100644 --- a/src/LiveDevelopment/MultiBrowserImpl/protocol/LiveDevProtocol.js +++ b/src/LiveDevelopment/MultiBrowserImpl/protocol/LiveDevProtocol.js @@ -48,6 +48,7 @@ define(function (require, exports, module) { DocumentObserver = require("text!LiveDevelopment/MultiBrowserImpl/protocol/remote/DocumentObserver.js"), RemoteFunctions = require("text!LiveDevelopment/Agents/RemoteFunctions.js"), EditorManager = require("editor/EditorManager"), + LiveDevMultiBrowser = require("LiveDevelopment/LiveDevMultiBrowser"), HTMLInstrumentation = require("language/HTMLInstrumentation"); /** @@ -213,7 +214,7 @@ define(function (require, exports, module) { // Inject DocumentObserver into the browser (tracks related documents) script += DocumentObserver; // Inject remote functions into the browser. - script += "window._LD=(" + RemoteFunctions + "())"; + script += "window._LD=(" + RemoteFunctions + "(" + JSON.stringify(LiveDevMultiBrowser.config) + "))"; return "\n"; }