MCPcopy Create free account
hub / github.com/react/create-react-app / cleanup

Function cleanup

packages/react-error-overlay/fixtures/bundle_u.mjs:5223–5238  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5221 iframe.onerror = null;
5222 };
5223 var cleanup = function() {
5224 debug('cleanup');
5225 if (iframe) {
5226 unattach();
5227 // This timeout makes chrome fire onbeforeunload event
5228 // within iframe. Without the timeout it goes straight to
5229 // onunload.
5230 setTimeout(function() {
5231 if (iframe) {
5232 iframe.parentNode.removeChild(iframe);
5233 }
5234 iframe = null;
5235 }, 0);
5236 eventUtils.unloadDel(unloadRef);
5237 }
5238 };
5239 var onerror = function(err) {
5240 debug('onerror', err);
5241 if (iframe) {

Callers 1

onerrorFunction · 0.70

Calls 2

debugFunction · 0.70
unattachFunction · 0.70

Tested by

no test coverage detected