It depends on the contents of the IFrame. If the content is from a different domain, you are out of luck, as most modern browsers have closed this loophole for cross-site attacks.
However, if the content is in the SAME domain, you can use it as just another method for an IFrame window. If I remember correctly, you can use something like window.frames["_your_IFrame_ID_"].window.functionOrMethodName().
source
share