Fix MS17495: Initially wire sendMessage to ignore in appUi module

This commit is contained in:
Zach Fox 2018-08-09 11:33:26 -07:00
parent 16b483b338
commit e00dbcecc6

View file

@ -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.