Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 313845

Iframe render element

$
0
0

Problem/Motivation

There is the desire to make iframes load lazy. See #3167034-23: Leverage the 'loading' html attribute to enable lazy-load by default for images in Drupal core as an example. Currently, there is one iframe usage in core, but lots in contrib.

To make it easier for contrib to _also_ lazy load, let's add a render element in core. Core uses it. But then contrib can also use it and natively it will lazy load too. If we had already had a core iframe render element, it would then have been as easy as the previous image issue. But right now we can't easily fix contrib. Because '#type' => 'html_tag, '#tag' => 'iframe' is not really an API.

Steps to reproduce

Proposed resolution

Add a new render element for iframe. We could even get fancy and throw a warning if someone does the anti-pattern of '#tag' => 'iframe' (if we want to).

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 313845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>