listening should be based on the concept that the parsed message has all the required data to qualify as "my message", rather than whether we're an iframe or not. The conditional used here does not tell us whether we're an iframe or not, it only tells us how the browser has implemented the window.parent property.