postMessage from website in iframe to chrome extension background script fails

Is there a way to open an iframe in chrome-extensions background page and then receive from that webpage messages?

In the website I use:

window.parent.postMessage(message, '*');

'*' is unsafe so that I would like to change with the "domain" of the chrome-extension but currently that is not the main problem.

In the background.html, I have the iframe and also set a listener using

window.addEventListener('message', (event) => {
  console.log(event);
}

Currently the event is not trigger from the background html but it works for other websites that I load the iframe in.