You are here

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

Whether the render element is a <script>.

Parameters

array $element: A render element.

Return value

bool

1 call to AssetHtmlTagRenderElementTrait::isScript()
JsCollectionRenderer::render in src/Asset/JsCollectionRenderer.php
Renders an asset collection.

File

src/Asset/AssetHtmlTagRenderElementTrait.php, line 31

Class

AssetHtmlTagRenderElementTrait

Namespace

Drupal\http2_server_push\Asset

Code

protected static function isScript(array $element) {
  return isset($element['#type']) && $element['#type'] === 'html_tag' && (isset($element['#tag']) && $element['#tag'] === 'script');
}