[WRTjs]Check window when emit related event 17/277717/1 accepted/tizen/unified/20220714.135306 submit/tizen/20220713.160022
authorChunling Ye <chunling.ye@samsung.com>
Tue, 12 Jul 2022 09:52:03 +0000 (17:52 +0800)
committerChunling Ye <chunling.ye@samsung.com>
Tue, 12 Jul 2022 09:56:00 +0000 (17:56 +0800)
commit72cdd3affcbcbbc61d32cbddaf8dfa28c6f218e7
tree4e86efa482735b3f55913ae71a32b9506051c61b
parent9439cd79d1024a92c24cf7bde4529c02947b2760
[WRTjs]Check window when emit related event

For Epop, if miss any configuration in TV, the app will
terminate itself quickly, then 'quit->load-finish' will
happen, so check window before emit event to avoid exception.

Reference:
https://review.tizen.org/gerrit/#/c/platform/framework/web/wrtjs/+/268326/

Change-Id: Ic7168d3a41c1c4cd3f31477259666c8f3b80a797
Signed-off-by: Chunling Ye <chunling.ye@samsung.com>
wrt_app/src/web_application.ts