You are here

protected function AsyncJs::callback in Advanced CSS/JS Aggregation 8.3

Same name and namespace in other branches
  1. 8.4 advagg_mod/src/Asset/AsyncJs.php \Drupal\advagg_mod\Asset\AsyncJs::callback()

Callback to replace individual stylesheet links.

Parameters

array $matches: Array from matches from preg_replace_callback.

Return value

string Updated html string.

File

advagg_mod/src/Asset/AsyncJs.php, line 33

Class

AsyncJs
Add async tag to scripts.

Namespace

Drupal\advagg_mod\Asset

Code

protected function callback(array $matches) {
  return "{$matches[0]} async";
}