KeyboardLayoutMap: size property
MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونهکد
{{SeeCompatTable}}{{APIRef("Keyboard API")}}
The **size** read-only property of the {{domxref("KeyboardLayoutMap")}} interface returns the number of elements in the map.
The property is otherwise the same as {{jsxref("Map.prototype.size")}}.
Value
A number.
Examples
The following example get the count of the location- or layout-specific string and its associated keyboard code on an English QWERTY keyboard.
js
navigator.keyboard.getLayoutMap().then((keyboardLayoutMap) => {
console.log(keyboardLayoutMap.size);
});Specifications
{{Specifications}}
Browser compatibility
{{Compat}}
See also
- {{jsxref("Map.prototype.size")}}