Confirmed users
891
edits
(→Info) |
|||
| Line 15: | Line 15: | ||
=== Response to Suggestions === | === Response to Suggestions === | ||
[https://wiki.mozilla.org/images/5/55/Webbluetooth-response-0314.pdf Response to Suggestions] | [https://wiki.mozilla.org/images/5/55/Webbluetooth-response-0314.pdf Response to Suggestions] | ||
* Revision (2014-05-12) | |||
:: '''13) Should we rebind handlers for adapter after it's been disabled ? (Evelyn)''' | |||
:: <strike>YES. To be consistent with attributes, the event handlers should also be reset as default value (nullptr). Application should rebind all handlers after adapter is re-enabled.</strike> | |||
:: NO. The event handlers are kept until applications remove them. The reason is that applications are unaware of the reset by gecko and assignments of reset event handlers cause unexpected behavior. | |||
:: '''Example''' | |||
var adapter = navigator.mozBluetooth.defaultAdapter; | |||
var device = ''PairedDevice''; | |||
device.attributechanged = adapter.onattributechanged; | |||
adapter.disable().then { function onResolve() { | |||
console.log("Resolved with void value"); | |||
// '''device.onattributechanged becomes nullptr but applications is unaware!''' | |||
}, function onReject(aReason) { | |||
console.log("Rejected with this reason: " + aReason); | |||
}); | |||
== BT Team Internal Discussion Result == | == BT Team Internal Discussion Result == | ||