[wp-trac] [WordPress Trac] #63821: Proposal: Drop support for IE conditional scripts and styles

WordPress Trac noreply at wordpress.org
Tue Sep 2 09:02:50 UTC 2025


#63821: Proposal: Drop support for IE conditional scripts and styles
-------------------------------------------------+-------------------------
 Reporter:  jonsurrell                           |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  6.9
Component:  General                              |     Version:  4.8
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-dev-  |     Focuses:
  note 2nd-opinion                               |  javascript, css
-------------------------------------------------+-------------------------
Changes (by jonsurrell):

 * keywords:  has-patch has-unit-tests needs-dev-note => has-patch has-unit-
     tests needs-dev-note 2nd-opinion


Comment:

 There's a question of how to handle conditional scripts.

 The proposed implementation keeps the script and adds the data to flag the
 script as conditional. Conditional scripts are prevented from being
 printed. The conditional script's dependency array must also be emptied so
 that its dependencies are not printed.

 An alternative would be to de-register a script when it is marked as
 "conditional".

 [I shared my opinion]:

 > Setting a script as conditional is analogous to de-registering it,
 nothing should happen with it.
 >
 > Removing the conditional scripts dependencies is similar, and perhaps
 riskier. A script could be set to conditional and later have its
 conditional removed, in which case it has lost its associated dependencies
 and is likely broken in some way. In that sense, de-registering the script
 may be preferable and the formerly conditional script can be re-registered
 without the conditional.

 More feedback would be appreciated.

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


More information about the wp-trac mailing list