1 | | In the course of making the `wp-embed` script use the `defer` loading strategy (#58931), I found that there was some old code for IE10/IE11 which we can remove now since those browsers are longer supported. Also, since they're not supported anymore we can freely make use of `URL` instead of hacking URL parsing with `document.createElement('a')`. Additionally, I noticed that the deprecated `substr()` string method is being used which should be replaced with `substring()` or `slice()`. |
| 1 | In the course of making the `wp-embed` script use the `defer` loading strategy (#58931), I found that there was some old code for IE10/IE11 which we can remove now since those browsers are longer supported. Also, since they're not supported anymore we can freely make use of `URL` instead of hacking URL parsing with `document.createElement('a')`. Lastly, the code includes a `load` event on the `window` as an apparently fallback for browsers which don't support `DOMContentLoaded`, so that event listener can be removed as well. |
| 2 | |
| 3 | Aside: I noticed that the deprecated `substr()` string method is being used which should be replaced with `substring()` or `slice()`. |