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

Function _getStyleSaver

esm/CSSPlugin.js:177–191  ·  view source on GitHub ↗
(target, properties)

Source from the content-addressed store, hash-verified

175 }
176},
177 _getStyleSaver = function _getStyleSaver(target, properties) {
178 var saver = {
179 target: target,
180 props: [],
181 revert: _revertStyle,
182 save: _saveStyle
183 };
184 target._gsap || gsap.core.getCache(target); // just make sure there's a _gsap cache defined because we read from it in _saveStyle() and it's more efficient to just check it here once.
185
186 properties && target.style && target.nodeType && properties.split(",").forEach(function (p) {
187 return saver.save(p);
188 }); // make sure it's a DOM node too.
189
190 return saver;
191},
192 _supports3D,
193 _createElement = function _createElement(type, ns) {
194 var e = _doc.createElementNS ? _doc.createElementNS((ns || "http://www.w3.org/1999/xhtml").replace(/^https/, "http"), type) : _doc.createElement(type); //some servers swap in https for http in the namespace which can break things, making "style" inaccessible.

Callers 8

CSSPlugin.jsFile · 0.70
DraggableFunction · 0.70
DrawSVGPlugin.jsFile · 0.70
InertiaPlugin.jsFile · 0.70
Physics2DPlugin.jsFile · 0.70
_fitFunction · 0.70

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…