--- title: Bluetooth.onavailabilitychanged slug: Web/API/Bluetooth/onavailabilitychanged translation_of: Web/API/Bluetooth/onavailabilitychanged ---
{{APIRef("Bluetooth API")}}{{securecontext_header}}{{SeeCompatTable}}
The onavailabilitychanged
property of the {{DOMxRef("Bluetooth")}} interface is an {{DOMxRef("EventHandler")}} that processes availabilitychanged
events that fire when the Bluetooth system as a whole becomes available or unavailable to the {{Glossary("User Agent")}}.
Bluetooth.onavailabilitychanged = functionRef;
functionRef
is the handler function to be called when the Bluetooth availabilitychanged
event fires.
Specification | Status | Comment |
---|---|---|
{{SpecName("Web Bluetooth", "#bluetooth", "Bluetooth")}} | {{Spec2("Web Bluetooth")}} | Initial definition. |
{{compat ( "api.Bluetooth.onavailabilitychanged")}}