[wp-trac] [WordPress Trac] #38461: Don't load svg-painter.js on every admin screen
WordPress Trac
noreply at wordpress.org
Sun Oct 23 15:29:14 UTC 2016
#38461: Don't load svg-painter.js on every admin screen
-----------------------------+------------------------------------------
Reporter: johnbillion | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Administration | Version: 3.8
Severity: normal | Resolution:
Keywords: has-patch close | Focuses: administration, performance
-----------------------------+------------------------------------------
Changes (by ocean90):
* keywords: has-patch => has-patch close
Comment:
Isn't `user-profile.js` just re-initializing the painter on color scheme
changes?
Otherwise the script is always initializing itself if the current browser
doesn't support SVG:
{{{
$(document).ready( function() {
// detection for browser SVG capability
if ( document.implementation.hasFeature(
'http://www.w3.org/TR/SVG11/feature#Image', '1.1' ) ) {
$( document.body ).removeClass( 'no-svg'
).addClass( 'svg' );
wp.svgPainter.init();
}
});
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38461#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list