MCPcopy Index your code
hub / github.com/ampproject/amphtml / notifyIfChanged

Function notifyIfChanged

src/utils/display-observer.js:491–497  ·  view source on GitHub ↗

* @param {!Array } callbacks * @param {!Element} target * @param {boolean} newDisplay * @param {boolean} oldDisplay

(callbacks, target, newDisplay, oldDisplay)

Source from the content-addressed store, hash-verified

489 * @param {boolean} oldDisplay
490 */
491function notifyIfChanged(callbacks, target, newDisplay, oldDisplay) {
492 if (newDisplay != null && newDisplay !== oldDisplay) {
493 for (let i = 0; i < callbacks.length; i++) {
494 callCallbackNoInline(callbacks[i], target, newDisplay);
495 }
496 }
497}
498
499/**
500 * @param {!ObserverCallbackDef} callback

Callers 4

unregisterContainerMethod · 0.85
docVisibilityChanged_Method · 0.85
setObservation_Method · 0.85
updateAttributeMethod · 0.85

Calls 1

callCallbackNoInlineFunction · 0.85

Tested by

no test coverage detected