MCPcopy Index your code
hub / github.com/angular/angular / validateStyleProperty

Function validateStyleProperty

packages/animations/browser/src/render/shared.ts:175–191  ·  view source on GitHub ↗
(prop: string)

Source from the content-addressed store, hash-verified

173let _CACHED_BODY: {style: any} | null = null;
174let _IS_WEBKIT = false;
175export function validateStyleProperty(prop: string): boolean {
176 if (!_CACHED_BODY) {
177 _CACHED_BODY = getBodyNode() || {};
178 _IS_WEBKIT = _CACHED_BODY!.style ? 'WebkitAppearance' in _CACHED_BODY!.style : false;
179 }
180
181 let result = true;
182 if (_CACHED_BODY!.style && !containsVendorPrefix(prop)) {
183 result = prop in _CACHED_BODY!.style;
184 if (!result && _IS_WEBKIT) {
185 const camelProp = 'Webkit' + prop.charAt(0).toUpperCase() + prop.slice(1);
186 result = camelProp in _CACHED_BODY!.style;
187 }
188 }
189
190 return result;
191}
192
193export function validateWebAnimatableStyleProperty(prop: string): boolean {
194 return ANIMATABLE_PROP_SET.has(prop);

Callers 3

validateStylePropertyMethod · 0.90
validateStylePropertyMethod · 0.90
validateStylePropertyMethod · 0.85

Calls 3

getBodyNodeFunction · 0.85
containsVendorPrefixFunction · 0.85
charAtMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…