Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By heddn on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
10.1.x
Introduced in version:
10.1.0
Issue links:
Description:
A render element for iframe has been added.
Previously
$build['video'] = [
'#type' => 'html_tag',
'#tag' => 'iframe',
'#attributes' => [
'src' => 'https://example.com/video.webm',
'allow' => 'fullscreen',
'width' => 420,
'height' => 315,
'loading' => 'eager',
'class' => ['foo', 'bar'],
],
];
Now
$build['video'] = [
'#type' => 'iframe',
'#src' => 'https://example.com/video.webm',
'#allow' => 'fullscreen',
'#width' => 420,
'#height' => 315,
'#loading' => 'eager',
'#attributes' => [
'class' => ['foo', 'bar'],
],
];
Impacts:
Module developers
Themers