Firefox Tomorrow

web api instance property

KeyboardLayoutMap: size property

View on MDN ↗

Limited availability

The size read-only property of the KeyboardLayoutMap interface returns the number of elements in the map.

The property is otherwise the same as 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.

navigator.keyboard.getLayoutMap().then((keyboardLayoutMap) => {
  console.log(keyboardLayoutMap.size);
});

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also