Almost all issues are gone now. Except the usage of any
in the channel service nothing serious is left. The channel service looks like as if it was overlooked. The other services look just fine.
channel.service.ts
function sendReadyMessage() { | |
if (window.opener) { | |
// Send "ready" message to the parent window that opened this page | |
window.opener.postMessage('ready', 'https://hotel.keib.dev'); | |
console.log('Sent "ready" message to parent window'); | |
} else if (window.parent && window.parent !== window) { | |
// Alternative: if this page is in an iframe instead of popup | |
window.parent.postMessage('ready', 'https://hotel.keib.dev'); | |
console.log('Sent "ready" message to parent frame'); | |
} else { |