J4 Usage of com_wrapper.iframe script

9 views
Skip to first unread message

Viper

unread,
May 14, 2022, 4:54:13 PM5/14/22
to Joomla! General Development

Hi!
How can I reuse this script in my component?
I insert in component template
$wa = $this->document->getWebAssetManager();
$wa->registerAndUseScript('com_wrapper.iframe', 'com_wrapper/iframe-height.min.js', [], ['defer' => true]);

And render iframe
<div class="com-wrapper contentpane">
<?php echo HTMLHelper::_(
'iframe',
Route::_('index.php?option=com_jcomments&view=form&tmpl=component'),
'commentsFormFrame',
array('width' => '100%', 'class' => 'com-wrapper__iframe wrapper')
); ?>
</div>

But the iframe height still the same as initial. Any ideas?
Reply all
Reply to author
Forward
0 new messages