Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

aem touch UI - document.domain is not working

Avatar

Level 1

Hi,

I am using document.domain for for get iframe url's current page on subdomain which is working fine classic UI, same code line is failing in aem touch UI the whole page is hanging with this line of code If i remove document.domain it is working fine.Does anyone knows some workaround to correct this?

Here is code snippet

<script>

    var anonymousUrl = "<%=anonymousUrl%>";

  var loginUrl = "<%=loginUrl%>";

    document.domain = "mydomain.com";

    function IframeLoaded() {

      var iFrameID = document.getElementById('idIframe');    

      var size=iFrameID.contentWindow.document.body.scrollHeight;

      if(iFrameID) {          

          iFrameID.height = "";

          iFrameID.height = iFrameID.contentWindow.document.body.scrollHeight + "px";

      } 

    }

</script>

0 Replies