Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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