-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
script_tag: cosmetic for value-less attributes
Some attributes are usually written without values, for example : `<script defer async src="..." />` This is purely cosmetic as the attribute should also be accepted with an empty value or a value identical to the attribute's name : https://dev.w3.org/html5/pf-summary/infrastructure.html#boolean-attribute
- Loading branch information
Showing
3 changed files
with
26 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
$script = ['src' => 'js/printer.js']; | ||
$script = ['src' => 'js/printer.js', 'defer' => null]; | ||
|
||
echo script_tag($script); | ||
// <script src="http://site.com/js/printer.js" type="text/javascript"></script> | ||
// <script src="http://site.com/js/printer.js" defer type="text/javascript"></script> |