Onjieee
Onjieee

Reputation: 39

send data to an object in another html from nodejs server

I'm using Iframe in html5 to display an html page inside an html page. Can I possibly call an object that is not in the main html file but instead in the linked html file?

Upvotes: 0

Views: 126

Answers (1)

John Ellmore
John Ellmore

Reputation: 2229

Yes, with some security restrictions.

Direct interaction between two frames of the same origin is allowed mostly without restriction.

Communication between different origins (different ports, schemes, or hosts) is much more restricted because of security concerns. Still, you can communicate across origins safely using Window.postMessage() (MDN docs).

Upvotes: 2

Related Questions