window.addEventListener(‘message’, function (event) { key = event.data.data; });