[wp-trac] [WordPress Trac] #12009: Add support for HTML 5 "async" and "defer" attributes
WordPress Trac
noreply at wordpress.org
Thu Apr 9 09:00:58 UTC 2020
#12009: Add support for HTML 5 "async" and "defer" attributes
---------------------------+-----------------------------
Reporter: Otto42 | Owner: azaozz
Type: enhancement | Status: reopened
Priority: normal | Milestone: Future Release
Component: Script Loader | Version: 4.6
Severity: normal | Resolution:
Keywords: | Focuses:
---------------------------+-----------------------------
Comment (by rogeriomoreira):
Replying to [comment:67 vanaf1979]:
> @rogeriomoreira Maybe their are other (future) attributes. So instead of
my patch we could consider a function wp_script_attributes(array('attr' =>
value)). So we can extend it's functionality when other attributes come on
the scene!?
That can be a solution but I was thinking in something like:
{{{
wp_enqueue_script( string $handle, string $src = '', string[] $deps =
array(), string|bool|null $ver = false, bool $in_footer = false, array
$attributes = [(attribute, value), (attribute, value)])
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/12009#comment:68>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list