-
Notifications
You must be signed in to change notification settings - Fork 12
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
Ponyfill #26
Comments
You're right about the So importing Alternatively, you can load As-is, the only way to accidentally load import 'resize-observer/lib';
// or:
import 'resize-observer/lib/index'; At that point, I'd almost like to rename it and call it a feature. We could move/build In fact, that really sounds like something that should be done. I'm going to keep this issue open to track that. |
Oh, I see. I missed that. Sorry for reporting on a non-existing issue. |
@devrelm This means that if the browser already support ResizeObserver we will use the native? |
No. When you use The reason for this is that no matter how hard we try to keep this package in line with the ResizeObserver spec, we have seen some differences pop up here and there. To keep from having strange behavior pop up on some browsers but not others, we decided it would be better to have |
Thanks @devrelm 🙏 So i wanted to understand if the logic of conditionally using the native already done or should we write it ourselves. I understand that the latter is the case 🙂 |
I am not sure about this but I think that since the index.ts file call the install function immediately, then window.ResizeObserver will always be overwritten, and that that should be avoided by ponyfills.
Feel free to close this if I have misunderstood your code or what ponyfill means. 🙂
The text was updated successfully, but these errors were encountered: