Comparing version 2.1.0 to 3.0.0
@@ -32,9 +32,22 @@ /** | ||
/** | ||
* Specify platform name | ||
* | ||
* @type {string} | ||
*/ | ||
app.platform = 'mag'; | ||
switch ( PLATFORM ) { | ||
case 'TIZEN': | ||
app.platform = 'tizen'; | ||
require('tzn-keys'); | ||
break; | ||
case 'WEBOS': | ||
app.platform = 'webos'; | ||
require('webos-keys'); | ||
break; | ||
case 'SMARTTV': | ||
app.platform = 'smarttv'; | ||
require('stv-keys'); | ||
break; | ||
default: | ||
app.platform = 'mag'; | ||
break; | ||
} | ||
/** | ||
@@ -44,5 +57,2 @@ * Show app. | ||
app.ready = function () { | ||
// if ( this.events['show'] ) { | ||
// this.emit('show'); | ||
// } | ||
window.core.call('app:ready'); | ||
@@ -60,3 +70,3 @@ }; | ||
app.exit = function () { | ||
if ( app.events['exit'] ) { | ||
if ( app.events.exit ) { | ||
app.emit('exit'); | ||
@@ -70,7 +80,7 @@ } | ||
events.load = function ( event ) { | ||
//window.core = window.parent.getCoreInstanse(window, app); | ||
document.body.setAttribute('platform', app.platform); | ||
core.device && document.body.setAttribute('device', core.device.model); | ||
if ( core.ready ) { | ||
if ( app.events['load'] ) { | ||
if ( app.events.load ) { | ||
// notify listeners | ||
@@ -77,0 +87,0 @@ app.emit('load', {}); |
{ | ||
"name": "mag-app", | ||
"version": "2.1.0", | ||
"version": "3.0.0", | ||
"description": "MAG SDK application core.", | ||
@@ -22,3 +22,6 @@ "author": { | ||
"stb-app": "^2.0.3", | ||
"stb-keys": "^1.4.4" | ||
"stb-keys": "^1.4.4", | ||
"tzn-keys": "^1.0.4", | ||
"webos-keys": "^1.0.5", | ||
"stv-keys": "^1.0.7" | ||
}, | ||
@@ -25,0 +28,0 @@ "devDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17484
442
6
+ Addedstv-keys@^1.0.7
+ Addedtzn-keys@^1.0.4
+ Addedwebos-keys@^1.0.5