Make WordPress Core

Opened 8 days ago

Closed 6 days ago

Last modified 6 days ago

#61995 closed enhancement (fixed)

Remove old IE9 code from svg-painter.js

Reported by: tobiasbg's profile TobiasBg Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.7 Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch
Focuses: javascript, performance Cc:

Description

wp.svgPainter is a JavaScript function that adjusts the fill color property and similar of SVG background images in the WordPress admin menu, based on the current admin color scheme.

It is enqueued on every admin page load.

About half of the file's code is a back-compat polyfill of base64 functions for IE9.

WordPress no longer supports IE9 and all modern browsers come with these functions.

The polyfill should be removed to save some kilobytes on every page load of every WordPress admin page visit.

Change History (4)

This ticket was mentioned in PR #7300 on WordPress/wordpress-develop by @TobiasBg.


8 days ago
#1

  • Keywords has-patch added; needs-patch removed

#3 @SergeyBiryukov
6 days ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 58997:

Administration: Remove old IE9 code from wp-admin/js/svg-painter.js.

About half of the file's code was a back-compat polyfill of base64 functions for IE9.

Since WordPress no longer supports IE9 as of version 4.8, and all modern browsers come with these functions, the polyfills can be removed.

Follow-up to [26072], [26131], [26601], [47771].

Props TobiasBg, sabernhardt.
Fixes #61995.

@SergeyBiryukov commented on PR #7300:


6 days ago
#4

Thanks for the PR! Merged in r58997.

Note: See TracTickets for help on using tickets.