I'm creating a gear watch face with Tizen studio. I write the code to create always-on mode and it works on wearable 2.3.2 without any errors. When I try it on wearable 3.0 it displays some errors when the always-on mode is activated and the device screen turns off.
this is the error:
Uncaught TypeError: Failed to execute 'initCustomEvent' on 'CustomEvent': 4 arguments required, but only 3 present.
the source shows this:
(function(){var __event = document.createEvent("CustomEvent");
__event.initCustomEvent("timetick", true, true);
document.dispatchEvent(__event);
for (var i=0; i < window.frames.length; i++)
{ window.frames[i].document.dispatchEvent(__event); }})()
I found a fix on the internet for this, change
" __event.initCustomEvent("timetick", true, true); "
to
" __event.initCustomEvent("timetick", true, true, {});"
but how I can do that?