MCPcopy
hub / github.com/ampproject/amphtml / closePopup

Function closePopup

tools/experiments/experiments.js:358–364  ·  view source on GitHub ↗
(affirmative)

Source from the content-addressed store, hash-verified

356 );
357 const unlistenSet = [];
358 const closePopup = (affirmative) => {
359 container.classList.remove('show');
360 unlistenSet.forEach((unlisten) => unlisten());
361 if (affirmative) {
362 callback();
363 }
364 };
365
366 messageElement.textContent = message;
367 unlistenSet.push(listenOnce(confirmButton, 'click', () => closePopup(true)));

Callers 1

showConfirmation_Function · 0.85

Calls 4

unlistenFunction · 0.85
callbackFunction · 0.50
removeMethod · 0.45
forEachMethod · 0.45

Tested by

no test coverage detected