}
let app: any = null;
+let fakeTimer: any;
+
export function start(id: string, filename: string) {
XWalkExtension.initialize();
XWalkExtension.setRuntimeMessageHandler((type, data) => {
// FIXME: this is for awaking up uv loop.
// uv loop is sleeping for a few second with tizen webapis's aync callback
- setInterval(() => {}, 100);
+ fakeTimer = setInterval(() => {}, 100);
try {
app = require(filename);
if (app.onStart !== undefined) {
}
export function stop(id: string) {
+ if (fakeTimer)
+ clearInterval(fakeTimer);
try {
if (app.onStop !== undefined) {
app.onStop();