@forge/bridge
5.10.15.10.2-next.0
out/view/emitReadyEvent.jsout/view/emitReadyEvent.js+12
Index: package/out/view/emitReadyEvent.js
===================================================================
--- package/out/view/emitReadyEvent.js
+++ package/out/view/emitReadyEvent.js
@@ -2,12 +2,24 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.emitReadyEvent = void 0;
const events_1 = require("../events/events");
const view_1 = require("./view");
+const bridge_1 = require("../bridge");
+const errors_1 = require("../errors");
+const callBridge = (0, bridge_1.getCallBridge)();
const EXTENSION_READY = 'EXTENSION_READY';
const emitReadyEvent = async () => {
const context = await view_1.view.getContext();
await events_1.events.emit(EXTENSION_READY, {
localId: context.localId
});
+ try {
+ const success = await callBridge('emitReadyEvent');
+ if (success === false) {
+ throw new errors_1.BridgeAPIError('Unable to emit ready event.');
+ }
+ }
+ catch (err) {
+ throw new errors_1.BridgeAPIError('Unable to emit ready event.');
+ }
};
exports.emitReadyEvent = emitReadyEvent;