-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unnecessary browser polyfills #91329
Comments
Pinging @elastic/kibana-operations (Team:Operations) |
polyfills AbortController and ChildNode.Remove are both covered by our browser support matrix, now that IE11 has been removed. https://caniuse.com/childnode-remove https://caniuse.com/abortcontroller https://www.elastic.co/support/matrix#matrix_browsers Part of elastic#91329
ResizeObserver typings are added to @jbudz Is it the only reason to keep ResizeObserver polyfill? |
The other reason is it's used in development for test mocking here. We'll have to replace the mock implementation. |
We already have a mock https://github.com/elastic/kibana/blob/master/src/plugins/kibana_utils/public/resize_checker/resize_checker.test.ts#L43 We just need to mock native API instead of polyfill. Don't we? jest.spyOn(window, 'ResizeObserver').mockImplementation(() => {
// the same code as in the test file
}) |
Didn't see this issue before creating this specifically for resize-observer-polyfill #121509 I think we can remove the polyfill ? I listed all places it is used and tagged relevant teams |
@Dosant it might be easier to remove all the places at once. I'm closing the current issue, let's use the one you created to track the effort |
I was testing what performance benefits we can gain by migrating to TS v4.2 WIP is here https://github.com/restrry/kibana/tree/ts-4-2-rc
One of the errors was caused by
ResizeObserver
type incompatibility inlib.d.ts
andresize-observer-polyfill
package.I went to http://caniuse.com to check whether we need this polyfill for our browser support matrix
It seems that we can remove:
Not sure that we can get rid of
regenerator-runtime/runtime
. According to the comment, it's required for EUIkibana/packages/kbn-test/src/jest/babel_transform.js
Line 17 in 4584a8b
The text was updated successfully, but these errors were encountered: