You are here

protected static function AssetHtmlTagRenderElementTrait::isUnconditional in HTTP/2 Server Push 8

Whether the render element is unconditional.

An unconditional element is not browser-specific, i.e. is not wrapped in a conditional comment via the '#browsers' property.

Parameters

array $element: A render element.

Return value

bool

See also

\Drupal\Core\Render\Element\HtmlTag::preRenderConditionalComments

2 calls to AssetHtmlTagRenderElementTrait::isUnconditional()
CssCollectionRenderer::render in src/Asset/CssCollectionRenderer.php
Renders an asset collection.
JsCollectionRenderer::render in src/Asset/JsCollectionRenderer.php
Renders an asset collection.

File

src/Asset/AssetHtmlTagRenderElementTrait.php, line 50

Class

AssetHtmlTagRenderElementTrait

Namespace

Drupal\http2_server_push\Asset

Code

protected static function isUnconditional(array $element) {
  return empty($element['#browsers']) || $element['#browsers']['!IE'] === TRUE && $element['#browsers']['IE'] === TRUE;
}