Solution 1 :

When getting javascript to interact between documents. postMessage is the proper way to do it.

exact implementation is up to you depending on your problem.

Problem :

When I have HTML embedded in another server’s response and I own both of the servers, Is it possible to allow the embedded document to access the parent document or vis versa?

server one returns

<embed src=""></embed>

I want to listen for JS events from one doc to the other.

Perhaps there is a header I can set?