CSSTransformValue: keys() method
MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونهکد
{{APIRef("CSS Typed Object Model API")}} {{AvailableInWorkers}}
The **keys()** method of the {{domxref("CSSTransformValue")}} interface returns a new _array iterator_ that yields the index of each item in the object.
Syntax
js-nolint
keys()Parameters
None.
Return value
A new iterable iterator object.
Examples
Iterating over indexes
js
const transform = new CSSTransformValue([
new CSSTranslate(CSS.px(10), CSS.px(20)),
new CSSScale(2, 3),
]);
for (const index of transform.keys()) {
console.log(index);
}
// 0
// 1Specifications
{{Specifications}}
Browser compatibility
{{Compat}}
See also
- {{domxref("CSSTransformValue.CSSTransformValue", "CSSTransformValue()")}}
- {{domxref("CSSTransformValue.entries()")}}
- {{domxref("CSSTransformValue.forEach()")}}
- {{domxref("CSSTransformValue.length")}}
- {{domxref("CSSTransformValue.values()")}}
- Using the CSS Typed OM
- CSS Typed Object Model API