BluetoothUUID: canonicalUUID() statische Methode
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimentell: Dies ist eine experimentelle Technologie
Überprüfen Sie die Browser-Kompatibilitätstabelle sorgfältig vor der Verwendung auf produktiven Webseiten.
Die statische Methode canonicalUUID()
der BluetoothUUID
-Schnittstelle gibt die 128-Bit UUID zurück, wenn ein 16- oder 32-Bit UUID-Alias übergeben wird.
Syntax
BluetoothUUID.canonicalUUID(alias)
Parameter
alias
-
Ein String, der einen 16-Bit- oder 32-Bit-UUID-Alias enthält.
Rückgabewert
Eine 128-Bit UUID.
Beispiele
Im folgenden Beispiel wird die von dem Alias 0x110A
dargestellte UUID zurückgegeben und in der Konsole ausgegeben.
let result = BluetoothUUID.canonicalUUID("0x110A");
console.log(result); // "0000110a-0000-1000-8000-00805f9b34fb"
Spezifikationen
Specification |
---|
Web Bluetooth # dom-bluetoothuuid-canonicaluuid |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
canonicalUUID() static method |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Experimental. Expect behavior to change in the future.
- See implementation notes.