I have a jsff page containing af:InlineFrame.
The source of this InlineFrame is HTML file say Frame.html
This html file has a javascript function called inlineframeFunction()
I have a button added in the jsff page.
My usecase is to invoke the function inlineframeFunction on click of the button which i am not able achieve.
var doc = inlineFrame.contentDocument? 
inlineFrame.contentDocument: inlineFrame.contentWindow.document;
doc.frameFunction();
Frame.html
<script type="javascript">    
    function inlineframeFunction(){
        alert('Inline Frame Function ');
    }
  </script>
JSFF Page
<af:panelGroupLayout id="pgl1" layout="vertical">
      <af:resource type="javascript">
        function inlineFrameRegionPageFunction() {
          alert('Region Page Function');
          var inlineFrame = document.getElementById('r1:0:if2');
          var doc = inlineFrame.contentDocument? inlineFrame.contentDocument: inlineFrame.contentWindow.document;
          doc.frameFunction();
        }
      </af:resource>
    </af:panelGroupLayout>
    <af:panelGroupLayout id="pgl2" layout="vertical">
      <af:panelBox text="Inline Frame Region" id="pb2"
                   inlineStyle="background-color:Lime; border-color:Lime;">
        <f:facet name="toolbar"/>
        <af:inlineFrame id="if2" source="/Frame.html" shortDesc="InlineFrame"
                        inlineStyle="background-color:Gray;"/>
        <af:commandButton text="Inline Region Button" id="rb2"
                          actionListener="#{pageFlowScope.RegionBean.onClickInlineFrameRgnButton}"/>
      </af:panelBox>
    </af:panelGroupLayout>