Further changes to handle cross-domain window communications