document.addEventListener('webOSLaunch', function(inData) {}) not triggering in WebOS 4.x TVs

39 Views Asked by At
  1. I am developing a webOS TV app in react.js called appA.
  2. I have a partner TV app called appB which hosts the contents of appA.
  3. When the user clicks my content in appB, it launches my appA along with the details of the content clicked.
  4. In my appA, I have used "document.addEventListener('webOSLaunch')" listener in index.html's in the body section to listen to this event like shown below:
document.addEventListener("webOSLaunch", function (inData) {
        console.log("WebOSLaunch event triggered.");
        if(inData.detail){
          //rest of the code to call API with the data received
        }
      })
  1. This works fine in WebOS TV 5 and above.
  2. In WebOS TV 4.x the eventListener is not triggered at all. There is no errors thrown in the console. What could be the reason?

I tried logging, setting breakpoints, but does not work.

0

There are 0 best solutions below