this.sandbox = [];
this.webContents = null;
this.addonPkgs = [];
+ this.isTVProfile = (wrt.getPlatformType() === 'product_tv');
var _this = this;
app.on('before-quit', function(event) {
let reload = loadInfo.getReload() || _this.webApplication.isAlwaysReload;
if (!reload) {
- if (src != _this.webApplication.mainWindow.getURL())
- reload = true;
+ if (_this.isTVProfile) {
+ console.log(`src = ${src}, app-control uri = ${_this.webApplication.mainWindow.getURL()}`);
+ const url = require('url');
+ let appcontrolUrl = url.parse(src);
+ let originUrl = url.parse(_this.webApplication.mainWindow.getURL());
+ if (appcontrolUrl.protocol !== originUrl.protocol ||
+ appcontrolUrl.host !== originUrl.host ||
+ appcontrolUrl.pathname !== originUrl.pathname) {
+ reload = true;
+ }
+ } else {
+ if (src != _this.webApplication.mainWindow.getURL()) {
+ reload = true;
+ }
+ }
}
// handle http://tizen.org/appcontrol/operation/main operation specially.
// only menu-screen app can send launch request with main operation.