Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit f017567

Browse files
added async to optional attributes
1 parent cc1d5dc commit f017567

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Helper/HeadScript.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ class HeadScript extends Placeholder\Container\AbstractStandalone
8787
'charset',
8888
'crossorigin',
8989
'defer',
90+
'async',
9091
'language',
9192
'src',
9293
];
@@ -393,6 +394,9 @@ public function itemToString($item, $indent, $escapeStart, $escapeEnd)
393394
if ('defer' == $key) {
394395
$value = 'defer';
395396
}
397+
if ('async' == $key) {
398+
$value = 'async';
399+
}
396400
$attrString .= sprintf(' %s="%s"', $key, ($this->autoEscape) ? $this->escape($value) : $value);
397401
}
398402
}

0 commit comments

Comments
 (0)