JavaScript error "event.data.split is not a function" on feedback widget

JavaScript error "event.data.split is not a function" on feedback widget

I am using zoho feedback widget. Getting below JS error from the included script

Error: " event.data.split is not a function" on feedback widget

Our application is prepared using Angular2 and we are just including default feedback widget code in the index.html page.

Generated Code & Error: 
window.addEventListener("message",zsReceiveMessage,false); } else if (window.attachEvent) { // IE before version 9 window.attachEvent("onmessage",zsReceiveMessage ); } } //Function which receives and processes the Screen-Shot Content of i-frame type
var isScreenShotAdded = false; 
var zsScreenShotBlob = ""; 
function zsReceiveMessage(event) { 
      var zsUrlRegex = /^(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\:\'\/\\\+=&%\$#_]*)?$/;
      if(zsUrlRegex.test(event.origin)) { 
            var zsMessageType = event.data.split("&&&")[0]
            if(zsMessageType == "zsScreenShotContent") { 
                  var zsScreenShotImage = event.data.split("&&&")[1]; 
                  var zsScreenShotImageContents = zsScreenShotImage.split(",");
                  zsScreenShotBlob = new Blob([zsScreenShotImageContents[1]],{ type : "image/png"});                   zsWidgetJQuery("#screenshot").text("Screenshot.png");// No i18n                   zsWidgetJQuery("#screenshotPreviewContainer,#screenshotmdiv").show();                   zsWidgetJQuery("#hilightSelDiv,#blackoutSelDiv").attr("class","fleft fbssnormal");                   zsWidgetJQuery("#screenshotPreview").attr("src",zsScreenShotImage); isScreenShotAdded = true; 
            } else if(zsMessageType == "ZSUserDetails") {           
                  zsWidgetJQuery("#feedbNameTxtField,#feedbEmailTxtField,#zsCaptcha").remove();                                    zsWidgetJQuery(".zsfeedbkrpanel,.zsfeedbklpanel").removeClass("zscaptcha").addClass("zsnocaptcha");                                    zsWidgetJQuery("#zsUserNameEmailContainer").addClass("zsnonameemail"); 
                  zsLoggedInUserName = event.data.split("&&&")[1]
                  zsLoggedInUserEmail = event.data.split("&&&")[2]
                  isZsCaptchaPresent = false; //To handle in widget Minimise and Maximise */ 
            } else if(zsMessageType == "zsClosePopup") { 
                  zsClosePopup(); 
            } 
      } 
}

    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



                                                                        Zoho Campaigns Resources


                                                                          Zoho CRM Resources

                                                                          • CRM Community Learning Series

                                                                            CRM Community Learning Series


                                                                          • Kaizen

                                                                            Kaizen

                                                                          • Functions

                                                                            Functions

                                                                          • Meetups

                                                                            Meetups

                                                                          • Kbase

                                                                            Kbase

                                                                          • Resources

                                                                            Resources

                                                                          • Digest

                                                                            Digest

                                                                          • CRM Marketplace

                                                                            CRM Marketplace

                                                                          • MVP Corner

                                                                            MVP Corner





                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now