[wp-trac] [WordPress Trac] #12009: Add support for HTML 5 "async" and "defer" attributes

WordPress Trac noreply at wordpress.org
Thu Apr 9 11:34:36 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:69 vanaf1979]:
 > Replying to [comment:68 rogeriomoreira]:
 > > 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)])
 > > }}}
 >
 > That would also be a possibility. But reading back in this ticket I
 think an extra attribute for wp_enqueue_script is not the desired
 solution. That's why i choose the "additional functions" route.

 Makes sense 👍, do you need any help with this patch?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/12009#comment:70>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list