Hi,

I am writing some tests and encounter a question that bluetooth Adapter
cannot be stringified.

var mozBt = window.navigator.mozBluetooth;
var request = mozBt.getDefaultAdapter();
var bt_adapter = request.result;
JSON.stringify(bt_adapter); // return {}

I expected to get a result such as *'{ address: "d8:e5:6d:2d:8e:39", class:
1515870810, discovering: false, name: "Flame", discoverable: false,
discoverableTimeout: 120, devices: Array[0], ondevicefound: null,
ondiscoverystatechanged: null, onpairedstatuschanged: null }'*, but I got
an empty object *'{}'*.
Isn't every JS object can be stringified? Does anyone have some clues for
me to trace the root cause?

Best Regards,
Al
-- 
---------------------------------------------------
Al Tsai
Senior QA Engineer, MoCo Taiwan.
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to