1 | (function eventBus(root) {
|
2 | // eslint-disable-next-line no-underscore-dangle, no-param-reassign
|
3 | root._eventbus = {
|
4 | emit(name, data = '') {
|
5 | const json = JSON.stringify({ name, data });
|
6 |
|
7 | window.localStorage.setItem('mocha-chrome-bus', json);
|
8 | }
|
9 | };
|
10 | })(window);
|