Hi Caio,

Some Tizen device API specs need mark the root element read-only, for eg 
SystemInfo<https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/systeminfo.html>,
 
Notification<https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/notification.html>
 , 
Bluetooth<https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html>
 etc. Guanxian try below code at very beginning in system_info_api.js, but it 
will cause tizen.systeminfo keep stays as null (exports.xxx seems does take 
affect).

So any idea or hint?

if (typeof tizen === "undefined") {
  tizen = new Object();
}
_addConstProperty(tizen, "systeminfo", null);

function _addConstProperty(obj, propertyKey, propertyValue) {
  Object.defineProperty(obj, propertyKey, {
    configurable: false,
    writable: false,
    value: propertyValue
  });
}


Thanks,
Halton.
_______________________________________________
Crosswalk-dev mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-dev

Reply via email to