| 85 | * @param {CustomEvent<{ currentHash: string }>} event event or hash |
| 86 | */ |
| 87 | var handler = function (event) { |
| 88 | lastHash = typeof event === "string" ? event : event.detail.currentHash; |
| 89 | if (!upToDate()) { |
| 90 | var status = module.hot.status(); |
| 91 | if (status === "idle") { |
| 92 | log("info", "[HMR] Checking for updates on the server..."); |
| 93 | check(); |
| 94 | } else if (["abort", "fail"].indexOf(status) >= 0) { |
| 95 | log( |
| 96 | "warning", |
| 97 | "[HMR] Cannot apply update as a previous update " + |
| 98 | status + |
| 99 | "ed. Need to do a full reload!" |
| 100 | ); |
| 101 | } |
| 102 | } |
| 103 | }; |
| 104 | |
| 105 | if (typeof EventTarget !== "undefined" && hotEmitter instanceof EventTarget) { |
| 106 | hotEmitter.addEventListener( |