I attempted running the following code snippet:
document.getElementById('targetFrame').contentWindow.targetFunction();
sourced from this forum post but it seems like it only works outside of the iframe. Is there a way to make it function solely within the confines of the iframe and not have any impact beyond that?