CoreFiles by mySites.guru
iframe-height.js21 lines, 784 bytes, from Joomla_4.0.0-beta7-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta6
md5
505f9caad3ee3ab836656a2e988f5d70
sha1
750e533d88f830f366bee9fbec40c0c3fe94546c
sha256
ffc91e49961f73851d10dafb5299725d99736781bb954c682c95e504cb6b04fd
/**
* PLEASE DO NOT MODIFY THIS FILE. WORK ON THE ES6 VERSION.
* OTHERWISE YOUR CHANGES WILL BE REPLACED ON THE NEXT BUILD.
**/

/**
 * @copyright   (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
(function (window, document) {
  window.iFrameHeight = function (iframe) {
    var doc = 'contentDocument' in iframe ? iframe.contentDocument : iframe.contentWindow.document;
    var height = parseInt(doc.body.scrollHeight, 10);

    if (!document.all) {
      iframe.style.height = "".concat(parseInt(height, 10) + 60, "px");
    } else if (document.all && iframe.id) {
      document.all[iframe.id].style.height = "".concat(parseInt(height, 10) + 20, "px");
    }
  };
})(window, document);

The same content is in 2 releases, Joomla 4.0.0-beta6 to 4.0.0-beta7. See them all, or every version of this file.