Skip to main content
Question

Uncaught TypeError: Cannot read properties of undefined (reading 'pluginMessage')

  • February 14, 2023
  • 0 replies
  • 1577 views

Nidhin_Kuttikkattu_Rajeevan

I was able to communicate between my typescript and html file by plugin message.
it was working fine.

window.onmessage = msg => {
let msg_type = msg.data.pluginMessage.pluginMessage.type
if (msg_type === ‘img’) {

   ............
   ............ 


}
if (msg_type === 'msg') {
   .......... 
   ..........
}
};

Based on this tutorial, Javascript JSZip Example to Compress Multiple Files Using HTML5 Form & Download it as ZIP File - YouTube
I added these 2 lines in my HTML.

After that I am getting this error
Uncaught TypeError: Cannot read properties of undefined (reading ‘pluginMessage’)
it is the highlighted one in previous code snippet

It is something from here…

This topic has been closed for replies.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings