From e00dbcecc6e39103ca696b7eef44de864f49b2b5 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Thu, 9 Aug 2018 11:33:26 -0700 Subject: [PATCH] Fix MS17495: Initially wire sendMessage to ignore in appUi module --- scripts/modules/appUi.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/modules/appUi.js b/scripts/modules/appUi.js index db81af3755..0657b57826 100644 --- a/scripts/modules/appUi.js +++ b/scripts/modules/appUi.js @@ -91,7 +91,7 @@ function AppUi(properties) { icon: that.normalButton, activeIcon: that.activeButton, text: that.buttonName, - sortOrder: that.sortOrder + sortOrder: that.sortOrder || undefined }); that.ignore = function ignore() { }; @@ -126,6 +126,7 @@ function AppUi(properties) { // (Although injected javascript still has to use JSON.stringify/JSON.parse.) that.sendToHtml = function (messageObject) { that.tablet.emitScriptEvent(JSON.stringify(messageObject)); }; that.fromHtml = function (messageString) { that.onMessage(JSON.parse(messageString)); }; + that.sendMessage = that.ignore; that.wireEventBridge = function wireEventBridge(on) { // Uniquivocally sets that.sendMessage(messageObject) to do the right thing. // Sets hasEventBridge and wires onMessage to eventSignal as appropriate, IFF onMessage defined.