We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Even the ESM version of Apex Charts leaks two globals to the global scope: addResizeListener() and removeResizeListener(). These seem to originate here: https://github.com/apexcharts/apexcharts.js/blob/e9e7fefc7fcd5d94b6ad23eda3e19da07d250a83/src/utils/DetectElementResize.js
addResizeListener()
removeResizeListener()
Furthermore, the very same script causes errors when Apex Charts is used in Shadow DOM.
I'd suggest ditching this altogether and using ResizeObserver with a polyfill for older browsers (it's already supported natively for 92% of users).
ResizeObserver
https://codepen.io/leaverou/pen/rNzYdXj?editors=0010 but literally any snippet would demonstrate the issuse. In this pen I'm also logging the globals though.
The text was updated successfully, but these errors were encountered:
Ah! this was the reason the ESM build was failing in some frameworks. Thanks for pointing this out, we will look into this further.
Sorry, something went wrong.
Merge pull request #2750 from LeaVerou/resizeobserver
db4b136
Replace old DetectElementResize script with ResizeObserver, fixes #1332 and #2743
Successfully merging a pull request may close this issue.
Description
Even the ESM version of Apex Charts leaks two globals to the global scope:
addResizeListener()
andremoveResizeListener()
.These seem to originate here: https://github.com/apexcharts/apexcharts.js/blob/e9e7fefc7fcd5d94b6ad23eda3e19da07d250a83/src/utils/DetectElementResize.js
Furthermore, the very same script causes errors when Apex Charts is used in Shadow DOM.
I'd suggest ditching this altogether and using
ResizeObserver
with a polyfill for older browsers (it's already supported natively for 92% of users).Reproduction Link
https://codepen.io/leaverou/pen/rNzYdXj?editors=0010
but literally any snippet would demonstrate the issuse.
In this pen I'm also logging the globals though.
The text was updated successfully, but these errors were encountered: