mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-15 15:16:29 +01:00
4bff827833
Pending block editor revisions for WordPress 5.4 will make use of `window.URL` and `window.DOMRect`. These are not available in Internet Explorer (or pre-Chromium Edge for `DOMRect`) and must be polyfilled to avoid script errors. The changes make use of the existing polyfill pattern, and existing `polyfill-library` dependency. The dependency is bumped to the latest version, since the previous version did not include the `DOMRect` polyfill. Props jorgefilipecosta. Fixes #49360. Built from https://develop.svn.wordpress.org/trunk@47238 git-svn-id: http://core.svn.wordpress.org/trunk@47038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 line
888 B
JavaScript
1 line
888 B
JavaScript
!function(e){function d(e){return void 0===e?0:Number(e)}function g(e,t){return e!==t&&!(isNaN(e)&&isNaN(t))}e.DOMRect=function(e,t,n,i){var u,r,o,c,f,a,m,b;u=d(e),r=d(t),o=d(n),c=d(i),Object.defineProperties(this,{x:{get:function(){return u},set:function(e){g(u,e)&&(u=e,f=a=void 0)},enumerable:!0},y:{get:function(){return r},set:function(e){g(r,e)&&(r=e,m=b=void 0)},enumerable:!0},width:{get:function(){return o},set:function(e){g(o,e)&&(o=e,f=a=void 0)},enumerable:!0},height:{get:function(){return c},set:function(e){g(c,e)&&(c=e,m=b=void 0)},enumerable:!0},left:{get:function(){return void 0===f&&(f=u+Math.min(0,o)),f},enumerable:!0},right:{get:function(){return void 0===a&&(a=u+Math.max(0,o)),a},enumerable:!0},top:{get:function(){return void 0===m&&(m=r+Math.min(0,c)),m},enumerable:!0},bottom:{get:function(){return void 0===b&&(b=r+Math.max(0,c)),b},enumerable:!0}})}}(this); |