Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Salesforce
  3. Question
Salesforce

What to do if one sees no console logs from LWC after applying window.addEventLister?

Asked by Christian Parsons Aug 30, 2023 945 views 1 answer
Share

About this question

 I am trying to build an LWC to listen to an event from window.postMessage by using window.AddEventLister. Here is a code I used:

After using this code, when I use the Chrome console to post any message to the window, I don’t see any logs from LWC. I have used Add.EventListener and this. addEventListener. What am I doing wrong? 

Your answer

1 Answer

More Salesforce discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Salesforce Blogs

Guides, tips and career advice on Salesforce from JanBask experts.