It is ok to set networktype to null, as it is optional.
And no need to throw exception if trying to set invalid value
(according to spec).
Object.defineProperty(this, 'networkType', {
get: function() { return this.networkTypeValue; },
set: function(type) {
- if (type in AllowDownloadOnNetworkType) {
+ if (type === null || type in AllowDownloadOnNetworkType) {
this.networkTypeValue = type;
- } else {
- throw new tizen.WebAPIException(tizen.WebAPIException.INVALID_VALUES_ERR);
}
}
});