check more edge cases on target.contentWindow