No Code Attached Yet
avatar brianteeman
brianteeman
2 Feb 2022

What does this script do (or what is it supposed to do)?

->registerAndUseScript('com_wrapper.iframe', 'com_wrapper/iframe-height.min.js', [], ['defer' => true]);

avatar brianteeman brianteeman - open - 2 Feb 2022
avatar joomla-cms-bot joomla-cms-bot - change - 2 Feb 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 2 Feb 2022
avatar dgrammatiko
dgrammatiko - comment - 2 Feb 2022

Nothing, kill it

avatar brianteeman
brianteeman - comment - 2 Feb 2022

So I wasnt going mad

avatar brianteeman
brianteeman - comment - 2 Feb 2022

(but if its not doing anything why did you spend your time converting it to es6?)

avatar dgrammatiko
dgrammatiko - comment - 2 Feb 2022

Actually I'm wrong here, the script will try to set the height of the iframe according to the contents inside it. Probably it shouldn't be useful as you can do that with css. So it's there for those that didn't actually styled correctly the iframe. In an perfect world that people used correctly HTML5 this should be redundant...

avatar brianteeman
brianteeman - comment - 2 Feb 2022

Actually I'm wrong here, the script will try to set the height of the iframe according to the contents inside it.

Doesnt seem to do that in my tests

Probably it shouldn't be useful as you can do that with css.

Really? I dont think you can but would like to learn

avatar dgrammatiko
dgrammatiko - comment - 2 Feb 2022

Doesnt seem to do that in my tests

Is the iframe in the same origin? Cross origin I think won't work anymore (although it's the iframe that shouldn't have right on the parent doc)

avatar brianteeman
brianteeman - comment - 2 Feb 2022

same origin

avatar dgrammatiko
dgrammatiko - comment - 2 Feb 2022

Do you have attribute load appended on the iframe?
Comes from here:

$wrapper->load = 'onload="iFrameHeight(this)"';

avatar brianteeman brianteeman - change - 2 Feb 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-02-02 16:21:11
Closed_By brianteeman
avatar brianteeman brianteeman - close - 2 Feb 2022
avatar brianteeman
brianteeman - comment - 2 Feb 2022

MY FAULT

I didnt set autoheight on

image

Add a Comment

Login with GitHub to post a comment