Skip to content

Instantly share code, notes, and snippets.

@FlorianRappl
Created February 27, 2020 14:14
Show Gist options
  • Save FlorianRappl/6f07cac60631d4bdbb50e6266805ba64 to your computer and use it in GitHub Desktop.
Save FlorianRappl/6f07cac60631d4bdbb50e6266805ba64 to your computer and use it in GitHub Desktop.
// microfrontend A
window.addEventListener('mife-a', e => {
const { msg } = e.detail;
//handle message;
});
// microfrontend B
window.dispatchEvent(new CustomEvent('mife-a', {
detail: {
type: 'show_dialog',
name: 'close_file'
}
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment