MCPcopy
hub / github.com/ampproject/amphtml / isAnimationNone

Function isAnimationNone

testing/helpers/service.js:123–133  ·  view source on GitHub ↗
(element, opt_isTimeBasedAnimation = true)

Source from the content-addressed store, hash-verified

121 * @return {boolean}
122 */
123export function isAnimationNone(element, opt_isTimeBasedAnimation = true) {
124 const noneValues = getInitialNoneValues(opt_isTimeBasedAnimation);
125 for (const property in noneValues) {
126 const value = getStyle(element, property);
127 const expectedValues = noneValues[property];
128 if (!expectedValues.some((expectedValue) => value == expectedValue)) {
129 return false;
130 }
131 }
132 return true;
133}
134
135/**
136 * Asserts that the given element is only visible to screen readers.

Calls 2

getStyleFunction · 0.90
getInitialNoneValuesFunction · 0.85

Tested by

no test coverage detected