diff --git a/demos/demo-minimal-js/index.html b/demos/demo-minimal-js/index.html index 78005b7..95d344a 100644 --- a/demos/demo-minimal-js/index.html +++ b/demos/demo-minimal-js/index.html @@ -158,12 +158,14 @@ />

2. Log in to the app

3. Set inbound calling availability

4. Start a call

5. End a call

Other events

{ document.querySelector(`#${id}`).setAttribute("disabled", true); }); } function enableButtons(ids) { - if (!state.enforceButtonsOrder) { - return; - } ids.forEach(id => { document.querySelector(`#${id}`).removeAttribute("disabled"); }); @@ -56,22 +49,13 @@ const cti = new CallingExtensions({ debugMode: true, eventHandlers: { onReady: ({ engagementId, portalId, userId, ownerId } = {}) => { + debugger; cti.initialized({ engagementId, isLoggedIn: false, sizeInfo, }); - disableButtons([ - INITIALIZE, - USER_AVAILABLE, - USER_UNAVAILABLE, - OUTGOING_CALL, - INCOMING_CALL, - ANSWER_CALL, - END_CALL, - COMPLETE_CALL, - LOG_OUT, - ]); + disableButtons([INITIALIZE]); if (engagementId) { enableButtons([ANSWER_CALL, END_CALL]); state.engagementId = engagementId; @@ -163,17 +147,7 @@ export function initialize() { cti.initialized({ isLoggedIn: false, }); - disableButtons([ - INITIALIZE, - USER_AVAILABLE, - USER_UNAVAILABLE, - OUTGOING_CALL, - INCOMING_CALL, - ANSWER_CALL, - END_CALL, - COMPLETE_CALL, - LOG_OUT, - ]); + disableButtons([INITIALIZE]); enableButtons([LOG_IN, SEND_ERROR, RESIZE_WIDGET]); } diff --git a/src/IFrameManager.js b/src/IFrameManager.js index fc63be7..7518088 100644 --- a/src/IFrameManager.js +++ b/src/IFrameManager.js @@ -77,7 +77,9 @@ class IFrameManager { } static createIFrame(iFrameOptions, onLoadCallback) { - const { src, width, height, hostElementSelector } = iFrameOptions; + const { + src, width, height, hostElementSelector, + } = iFrameOptions; if (!src || !width || !height || !hostElementSelector) { throw new Error(