Expand my Community achievements bar.

aem touch UI - document.domain is not working


Level 1


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


    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";




0 Replies