[wp-trac] [WordPress Trac] #22249: Add ability to set or remove attributes on enqueued scripts and styles.

WordPress Trac noreply at wordpress.org
Thu Mar 8 10:05:53 UTC 2018


#22249: Add ability to set or remove attributes on enqueued scripts and styles.
-------------------------------------------+-----------------------------
 Reporter:  ryanve                         |       Owner:
     Type:  enhancement                    |      Status:  assigned
 Priority:  normal                         |   Milestone:  Future Release
Component:  Script Loader                  |     Version:
 Severity:  normal                         |  Resolution:
 Keywords:  early has-patch needs-testing  |     Focuses:
-------------------------------------------+-----------------------------

Comment (by GaryJ):

 Replying to [comment:53 mor10]:
 > If `async` or `defer` are used, they are added to the script tag as
 booleans without values:

 A reminder that even the W3 Recommendation for HTML 5.2, includes coverage
 of XHTML syntax (XML-serialized HTML), which, among other things required
 by XML proper, disallows boolean attributes.

 - https://www.w3.org/TR/html52/introduction.html#html-vs-xhtml

 There may well be other issues that stop WP from being delivered as
 `application/xhtml+xml`, but let's not introduce new code that moves core
 output further away from polyglot markup.

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


More information about the wp-trac mailing list