diff --git a/package.json b/package.json
index bc4c7c36cc..a21dc152ed 100644
a
|
b
|
|
132 | 132 | "lodash": "4.17.15", |
133 | 133 | "masonry-layout": "3.3.2", |
134 | 134 | "moment": "2.22.2", |
135 | | "polyfill-library": "3.27.4", |
| 135 | "polyfill-library": "3.42.0", |
136 | 136 | "react": "16.9.0", |
137 | 137 | "react-dom": "16.9.0", |
138 | 138 | "twemoji": "12.1.3", |
diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php
index 9edc8be35b..e52da92520 100644
a
|
b
|
function wp_default_packages_vendor( &$scripts ) { |
86 | 86 | 'wp-polyfill-fetch', |
87 | 87 | 'wp-polyfill-formdata', |
88 | 88 | 'wp-polyfill-node-contains', |
| 89 | 'wp-polyfill-url', |
| 90 | 'wp-polyfill-dom-rect', |
89 | 91 | 'wp-polyfill-element-closest', |
90 | 92 | 'wp-polyfill', |
91 | 93 | ); |
… |
… |
function wp_default_packages_vendor( &$scripts ) { |
97 | 99 | 'lodash' => '4.17.15', |
98 | 100 | 'wp-polyfill-fetch' => '3.0.0', |
99 | 101 | 'wp-polyfill-formdata' => '3.0.12', |
100 | | 'wp-polyfill-node-contains' => '3.26.0-0', |
| 102 | 'wp-polyfill-node-contains' => '3.42.0', |
| 103 | 'wp-polyfill-url' => '3.42.0', |
| 104 | 'wp-polyfill-dom-rect' => '3.42.0', |
101 | 105 | 'wp-polyfill-element-closest' => '2.0.2', |
102 | 106 | 'wp-polyfill' => '7.4.4', |
103 | 107 | ); |
… |
… |
function wp_default_packages_vendor( &$scripts ) { |
122 | 126 | array( |
123 | 127 | '\'fetch\' in window' => 'wp-polyfill-fetch', |
124 | 128 | 'document.contains' => 'wp-polyfill-node-contains', |
| 129 | 'window.URL' => 'wp-polyfill-url', |
| 130 | 'window.DOMRect' => 'wp-polyfill-dom-rect', |
125 | 131 | 'window.FormData && window.FormData.prototype.keys' => 'wp-polyfill-formdata', |
126 | 132 | 'Element.prototype.matches && Element.prototype.closest' => 'wp-polyfill-element-closest', |
127 | 133 | ) |
diff --git a/tests/phpunit/tests/dependencies/scripts.php b/tests/phpunit/tests/dependencies/scripts.php
index 16846147da..5b885fe1b2 100644
a
|
b
|
JS; |
717 | 717 | $expected .= "<script type='text/javascript' src='http://example.com'></script>\n"; |
718 | 718 | $expected .= "<script type='text/javascript' src='/wp-includes/js/dist/vendor/wp-polyfill.min.js'></script>\n"; |
719 | 719 | $expected .= "<script type='text/javascript'>\n"; |
720 | | $expected .= "( 'fetch' in window ) || document.write( '<script src=\"http://example.org/wp-includes/js/dist/vendor/wp-polyfill-fetch.min.js\"></scr' + 'ipt>' );( document.contains ) || document.write( '<script src=\"http://example.org/wp-includes/js/dist/vendor/wp-polyfill-node-contains.min.js\"></scr' + 'ipt>' );( window.FormData && window.FormData.prototype.keys ) || document.write( '<script src=\"http://example.org/wp-includes/js/dist/vendor/wp-polyfill-formdata.min.js\"></scr' + 'ipt>' );( Element.prototype.matches && Element.prototype.closest ) || document.write( '<script src=\"http://example.org/wp-includes/js/dist/vendor/wp-polyfill-element-closest.min.js\"></scr' + 'ipt>' );\n"; |
| 720 | $expected .= "( 'fetch' in window ) || document.write( '<script src=\"http://example.org/wp-includes/js/dist/vendor/wp-polyfill-fetch.min.js\"></scr' + 'ipt>' );( document.contains ) || document.write( '<script src=\"http://example.org/wp-includes/js/dist/vendor/wp-polyfill-node-contains.min.js\"></scr' + 'ipt>' );( window.URL ) || document.write( '<script src=\"http://example.org/wp-includes/js/dist/vendor/wp-polyfill-url.min.js\"></scr' + 'ipt>' );( window.DOMRect ) || document.write( '<script src=\"http://example.org/wp-includes/js/dist/vendor/wp-polyfill-dom-rect.min.js\"></scr' + 'ipt>' );( window.FormData && window.FormData.prototype.keys ) || document.write( '<script src=\"http://example.org/wp-includes/js/dist/vendor/wp-polyfill-formdata.min.js\"></scr' + 'ipt>' );( Element.prototype.matches && Element.prototype.closest ) || document.write( '<script src=\"http://example.org/wp-includes/js/dist/vendor/wp-polyfill-element-closest.min.js\"></scr' + 'ipt>' );\n"; |
721 | 721 | $expected .= "</script>\n"; |
722 | 722 | $expected .= "<script type='text/javascript' src='/wp-includes/js/dist/dom-ready.min.js'></script>\n"; |
723 | 723 | $expected .= "<script type='text/javascript' src='/wp-includes/js/dist/a11y.min.js'></script>\n"; |
diff --git a/tools/webpack/packages.js b/tools/webpack/packages.js
index 81b2cca079..0da0fe0af4 100644
a
|
b
|
module.exports = function( env = { environment: 'production', watch: false, buil |
77 | 77 | 'wp-polyfill-fetch.js': 'whatwg-fetch/dist/fetch.umd.js', |
78 | 78 | 'wp-polyfill-element-closest.js': 'element-closest/element-closest.js', |
79 | 79 | 'wp-polyfill-node-contains.js': 'polyfill-library/polyfills/Node/prototype/contains/polyfill.js', |
| 80 | 'wp-polyfill-url.js': 'polyfill-library/polyfills/URL/polyfill.js', |
| 81 | 'wp-polyfill-dom-rect.js': 'polyfill-library/polyfills/DOMRect/polyfill.js', |
80 | 82 | 'wp-polyfill-formdata.js': 'formdata-polyfill/FormData.js', |
81 | 83 | 'moment.js': 'moment/moment.js', |
82 | 84 | 'react.js': 'react/umd/react.development.js', |
… |
… |
module.exports = function( env = { environment: 'production', watch: false, buil |
96 | 98 | 'wp-polyfill-fetch.min.js': 'whatwg-fetch/dist/fetch.umd.js', |
97 | 99 | 'wp-polyfill-element-closest.min.js': 'element-closest/element-closest.js', |
98 | 100 | 'wp-polyfill-node-contains.min.js': 'polyfill-library/polyfills/Node/prototype/contains/polyfill.js', |
| 101 | 'wp-polyfill-url.min.js': 'polyfill-library/polyfills/URL/polyfill.js', |
| 102 | 'wp-polyfill-dom-rect.min.js': 'polyfill-library/polyfills/DOMRect/polyfill.js', |
99 | 103 | }; |
100 | 104 | |
101 | 105 | const blockNames = [ |