[wp-trac] [WordPress Trac] #38585: Exit `wp-custom-header.js` gracefully in browsers without `addEventListener` support.

WordPress Trac noreply at wordpress.org
Mon Oct 31 06:16:17 UTC 2016


#38585: Exit `wp-custom-header.js` gracefully in browsers without
`addEventListener` support.
---------------------------+----------------------------
 Reporter:  peterwilsoncc  |       Owner:  peterwilsoncc
     Type:  defect (bug)   |      Status:  closed
 Priority:  normal         |   Milestone:  4.7
Component:  Themes         |     Version:  trunk
 Severity:  normal         |  Resolution:  fixed
 Keywords:  has-patch      |     Focuses:  javascript
---------------------------+----------------------------
Changes (by peterwilsoncc):

 * owner:   => peterwilsoncc
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"39050"]:
 {{{
 #!CommitTicketReference repository="" revision="39050"
 Themes: Exit `wp-custom-header.js` early in browsers wihout modern events.

 Adds a check for `window.addEventListener` support before attempting to
 use it. In browsers without support, the file is exited early to avoid
 throwing a JavaScript error.

 Fixes #38585.
 }}}

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


More information about the wp-trac mailing list