12345678910111213141516171819202122232425262728293031 |
- const singletonKey = '__webpack_hot_middleware_reporter__';
- function initWHMEventSource(messageHandler) {
- const client = window[singletonKey];
- client.useCustomOverlay({
- showProblems: function showProblems(type, data) {
- const error = {
- data: data,
- type: type,
- };
- messageHandler(error);
- },
- clear: function clear() {
- messageHandler({ type: 'ok' });
- },
- });
- }
- module.exports = { init: initWHMEventSource };
|