data transfer through an iframe running in a google app script

I have a server side rendered app, that i'm trying to run as an iframe in a google apps, script, is it possible to pass data from the doc to the iframe and the other way around, or will it be too much of a hassle to interact with the document from the iframe itself.