-
Notifications
You must be signed in to change notification settings - Fork 526
IntersectionObserverEntry should have a constructor #33
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
Comments
Hm, would JavaScript really want to create IntersectionObserverEntry objects? |
Mostly this. Having objects be constructed magically by the platform should be reserved for truly special cases. One example use case is mocking libraries. |
Sure. And it's preferred to do an initialization dictionary versus listing each parameter? |
For something with this many properties, none of which are clearly primary, yeah, I think that's the way to go. |
Closed via #44 |
Unfortunately it looks like we never implemented the constructor in blink |
IntersectionObserverEntry objects are not exotic and there's no reason to keep their creation magic that I can see. They should have a constructor. I'd suggest one that takes a dictionary
You could try to add smart defaults instead of making everything required but that doesn't seem worth the trouble.
The text was updated successfully, but these errors were encountered: