@sprucelabs/spruce-heartwood-utils 21.4.17 → 21.4.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -51,18 +51,18 @@ class HeartwoodDevice extends events_1.default {
|
|
|
51
51
|
this.sendCommand('skillViewLoaded');
|
|
52
52
|
}
|
|
53
53
|
sendCommand(command, payload) {
|
|
54
|
-
var _a, _b, _c, _d;
|
|
54
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
55
55
|
const options = {
|
|
56
56
|
command,
|
|
57
57
|
payload,
|
|
58
58
|
};
|
|
59
|
+
const message = JSON.stringify(options);
|
|
59
60
|
//@ts-ignore
|
|
60
|
-
(_d = (_c = (_b = (_a = window.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.messages) === null || _c === void 0 ? void 0 : _c.postMessage) === null || _d === void 0 ? void 0 : _d.call(_c,
|
|
61
|
+
(_d = (_c = (_b = (_a = window.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.messages) === null || _c === void 0 ? void 0 : _c.postMessage) === null || _d === void 0 ? void 0 : _d.call(_c, message);
|
|
61
62
|
// @ts-ignore
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
63
|
+
(_e = window.AndroidInterface) === null || _e === void 0 ? void 0 : _e.postMessage(message);
|
|
64
|
+
//@ts-ignore
|
|
65
|
+
(_g = (_f = window.api) === null || _f === void 0 ? void 0 : _f.postMessage) === null || _g === void 0 ? void 0 : _g.call(_f, message);
|
|
66
66
|
this.emit('command', command, payload);
|
|
67
67
|
}
|
|
68
68
|
}
|
|
@@ -45,18 +45,18 @@ export class HeartwoodDevice extends EventEmitter {
|
|
|
45
45
|
this.sendCommand('skillViewLoaded');
|
|
46
46
|
}
|
|
47
47
|
sendCommand(command, payload) {
|
|
48
|
-
var _a, _b, _c, _d;
|
|
48
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
49
49
|
const options = {
|
|
50
50
|
command,
|
|
51
51
|
payload,
|
|
52
52
|
};
|
|
53
|
+
const message = JSON.stringify(options);
|
|
53
54
|
//@ts-ignore
|
|
54
|
-
(_d = (_c = (_b = (_a = window.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.messages) === null || _c === void 0 ? void 0 : _c.postMessage) === null || _d === void 0 ? void 0 : _d.call(_c,
|
|
55
|
+
(_d = (_c = (_b = (_a = window.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.messages) === null || _c === void 0 ? void 0 : _c.postMessage) === null || _d === void 0 ? void 0 : _d.call(_c, message);
|
|
55
56
|
// @ts-ignore
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
57
|
+
(_e = window.AndroidInterface) === null || _e === void 0 ? void 0 : _e.postMessage(message);
|
|
58
|
+
//@ts-ignore
|
|
59
|
+
(_g = (_f = window.api) === null || _f === void 0 ? void 0 : _f.postMessage) === null || _g === void 0 ? void 0 : _g.call(_f, message);
|
|
60
60
|
this.emit('command', command, payload);
|
|
61
61
|
}
|
|
62
62
|
}
|