MCPcopy
hub / github.com/greensock/GSAP / _removeProperty

Function _removeProperty

esm/CSSPlugin.js:290–313  ·  view source on GitHub ↗
(target, property)

Source from the content-addressed store, hash-verified

288},
289 //reports if the element is an SVG on which getBBox() actually works
290_removeProperty = function _removeProperty(target, property) {
291 if (property) {
292 var style = target.style,
293 first2Chars;
294
295 if (property in _transformProps && property !== _transformOriginProp) {
296 property = _transformProp;
297 }
298
299 if (style.removeProperty) {
300 first2Chars = property.substr(0, 2);
301
302 if (first2Chars === "ms" || property.substr(0, 6) === "webkit") {
303 //Microsoft and some Webkit browsers don't conform to the standard of capitalizing the first prefix character, so we adjust so that when we prefix the caps with a dash, it's correct (otherwise it'd be "ms-transform" instead of "-ms-transform" for IE9, for example)
304 property = "-" + property;
305 }
306
307 style.removeProperty(first2Chars === "--" ? property : property.replace(_capsExp, "-$1").toLowerCase());
308 } else {
309 //note: old versions of IE use "removeAttribute()" instead of "removeProperty()"
310 style.removeAttribute(property);
311 }
312 }
313},
314 _addNonTweeningPT = function _addNonTweeningPT(plugin, target, property, beginning, end, onlySetAtEnd) {
315 var pt = new PropTween(plugin._pt, target, property, 0, 1, onlySetAtEnd ? _renderNonTweeningValueOnlyAtEnd : _renderNonTweeningValue);
316 plugin._pt = pt;

Callers 6

_convertToUnitFunction · 0.70
_tweenComplexCSSStringFunction · 0.70
_renderClearPropsFunction · 0.70
_getMatrixFunction · 0.70
_addRawTransformPTsFunction · 0.70
CSSPlugin.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…