mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 04:34:31 +00:00
Script Loader: Stop loading polyfills specific to Internet Explorer
This change removes the inline JavaScript attached to the `wp-polyfill` script responsible for loading polyfill libraries included specifically for Internet Explorer support. Support for the final version of IE supported in WordPress Core (IE11) was removed in [50784] and will on longer be supported when the next version of WordPress is released. These scripts are still registered and available to be enqueued, but WordPress will no longer load them by default. For more information, see https://wordpress.org/news/2021/05/dropping-support-for-internet-explorer-11/. Props youknowriad, gziolo, sergiomdgomes, desrosj. Fixes #53078. git-svn-id: https://develop.svn.wordpress.org/trunk@50934 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -122,21 +122,6 @@ function wp_default_packages_vendor( $scripts ) {
|
||||
}
|
||||
|
||||
$scripts->add( 'wp-polyfill', null, array( 'wp-polyfill' ) );
|
||||
did_action( 'init' ) && $scripts->add_inline_script(
|
||||
'wp-polyfill',
|
||||
wp_get_script_polyfill(
|
||||
$scripts,
|
||||
array(
|
||||
'\'fetch\' in window' => 'wp-polyfill-fetch',
|
||||
'document.contains' => 'wp-polyfill-node-contains',
|
||||
'window.DOMRect' => 'wp-polyfill-dom-rect',
|
||||
'window.URL && window.URL.prototype && window.URLSearchParams' => 'wp-polyfill-url',
|
||||
'window.FormData && window.FormData.prototype.keys' => 'wp-polyfill-formdata',
|
||||
'Element.prototype.matches && Element.prototype.closest' => 'wp-polyfill-element-closest',
|
||||
'\'objectFit\' in document.documentElement.style' => 'wp-polyfill-object-fit',
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
did_action( 'init' ) && $scripts->add_inline_script( 'lodash', 'window.lodash = _.noConflict();' );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user