CoreFiles by mySites.guru
iframe-height.js16 lines, 626 bytes, from Joomla_4.4.13-Stable-Full_Package.zip
Raw History Compare with 4.4.12
md5
4e616e785ce97fc4a10893b123b81cef
sha1
33bd3ef3873d0533c7a6951d615e118e4bfce177
sha256
04eeddc1b2ab89da8d91a8a097f769af9305ac3fda880f2666dc31f794ff1703
/**
 * @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 211 releases, Joomla 4.3.0-alpha1 to 6.2.1-rc1. See them all, or every version of this file.