Calling a function from an embedded Hype document


I have a Hype document (named “container”) containing an HTML widget, which contains another Hype exported HTML5 file (named “page0”). The HTML widget is defined as:

<script type="text/javascript" src="${resourcesFolderName}/jquery-2.2.4.min.js"></script>

<div id="page0_hype_container" style="margin:auto;position:relative;width:100%;height:100%;overflow:hidden;">
<script type="text/javascript" charset="utf-8" src="${resourcesFolderName}/page0_hype_generated_script.js"></script>


I would like to call a function (“theFunction”) in the parent Hype document (“container”) from the HTML widget’s Hype Document (“page0”). I tried the following in a function in the “page0” file but it does not work:


Any ideas? Thanks.