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

Function _callback

esm/gsap-core.js:965–986  ·  view source on GitHub ↗
(animation, type, executeLazyFirst)

Source from the content-addressed store, hash-verified

963 return label;
964},
965 _callback = function _callback(animation, type, executeLazyFirst) {
966 var v = animation.vars,
967 callback = v[type],
968 prevContext = _context,
969 context = animation._ctx,
970 params,
971 scope,
972 result;
973
974 if (!callback) {
975 return;
976 }
977
978 params = v[type + "Params"];
979 scope = v.callbackScope || animation;
980 executeLazyFirst && _lazyTweens.length && _lazyRender(); //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onUpdate on a timeline that reports/checks tweened values.
981
982 context && (_context = context);
983 result = params ? callback.apply(scope, params) : callback.call(scope);
984 _context = prevContext;
985 return result;
986},
987 _interrupt = function _interrupt(animation) {
988 _removeFromParent(animation);
989

Callers 4

_renderZeroDurationTweenFunction · 0.70
_interruptFunction · 0.70
gsap-core.jsFile · 0.70
_initTweenFunction · 0.70

Calls 3

applyMethod · 0.80
callMethod · 0.80
_lazyRenderFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…