Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const activeElement = document.querySelector('.element');
- function receiveMessage(event) {
- if (event.origin != "file:///Users/paweldabrowa/Websites/logitech/index.html") {
- return;
- }
- document.querySelector('#enter-competition');
- activeElement.classList.add('display-flex');
- }
- if (window.addEventListener) {
- window.addEventListener("message", receiveMessage, false);
- } else {
- window.attachEvent("onmessage", receiveMessage);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement