Quantcast
Channel: LivePerson Connect : Popular Discussions - All Communities
Viewing all articles
Browse latest Browse all 2324

Question about what happens in the collaboration SDK widget init function

$
0
0

Hi,

I'm saving a reference to the collaborationAgentWidget inside it's init function, both on the window and on the widget's scope like the following:

 

var WalkMeLivePersonWidget = window.WalkMeLivePersonWidget = liveperson.widgets.collaborationAgentWidget.extend({//Extends agent side tab SDK

    applicationType: "WalkMeLivePersonWidget",//Required parameter to be able to bind to events, must be identical for both sides

    //Required to be called when instantiated

    init: function(){

         

          // Some code

 

          WalkMeLivePersonCollaborationObject = window.WalkMeLivePersonCollaborationObject = this;

 

          // Some code

    }

});

 

Later on, I have a small snippet of code that creates a script tag and adds it to the head of the document.  When this script finishes loading, every once in a big number of users who work with this agent (rarely reproduced) both the window.WalkMeLivePersonCollaborationObject and WalkMeLivePersonCollaborationObject references are undefined.

 

So I have the following questions:

1. Do you do anything to the scope of the window or the scope of the widget after the init function is called?

2. Is there a best practice to debug the code of the widget (that appears in the Engagement Options) on the agent side? I'm using a log server until now and I wish I had something better.

 

Thanks and regards.

Shaul.

 

 


Viewing all articles
Browse latest Browse all 2324

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>