CSSTransformValue.forEach()
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。
CSSTransformValue.forEach()
メソッドは、指定された関数を CSSTransformValue
の各要素に対して一度だけ実行します。
構文
js
// アロー関数 forEach((currentValue) => { /* … */ } ) forEach((currentValue, index) => { /* … */ } ) forEach((currentValue, index, array) => { /* … */ } ) // コールバック関数 forEach(callbackFn) forEach(callbackFn, thisArg) // インラインコールバック関数 forEach(function(currentValue) { /* … */ }) forEach(function(currentValue, index) { /* … */ }) forEach(function(currentValue, index, array) { /* … */ }) forEach(function(currentValue, index, array) { /* … */ }, thisArg)
引数
callbackFn
-
各要素に対して実行する関数で、3 つの引数を取ります。
currentValue
-
現在処理中の要素の値です。
index
省略可-
現在処理中の要素の位置です。
array
省略可-
forEach()
が実行されているCSSTransformValue
です。
thisArg
省略可-
callback
が実行されるときにthis
として扱われる値(すなわち、Object
の参照)です。
返値
なし (undefined
)。
例
To Do
仕様書
This feature does not appear to be defined in any specification.>ブラウザーの互換性
Loading…