CoreFiles by mySites.guru
iframe-height.js16 lines, 626 bytes, from Joomla_4.2.2-Stable-Full_Package.zip
Raw History Compare with 4.2.1
md5
025915549850d7e8b2d92504bbee7c98
sha1
e7828782ee725b4c082e1e6b03947860558e6a31
sha256
0fdf4313fc2d06b422e04126e2759b57ecce43a24c2d9dd209a5234fa5a14b4e
/**
 * @copyright   (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
((window, document) => {
  window.iFrameHeight = iframe => {
    const doc = 'contentDocument' in iframe ? iframe.contentDocument : iframe.contentWindow.document;
    const height = parseInt(doc.body.scrollHeight, 10);

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

The same content is in 68 releases, Joomla 4.0.0-rc1 to 4.2.9. See them all, or every version of this file.