Event types colliding with Object prototype properties don't work
See original GitHub issueWe use event.type
as a key to get the array of event handlers, which throws an exception when we instead receive an Object.prototype
property and treat it like an array: https://jsfiddle.net/9t4kqaqr/
Our standard fix is appending a space (cf. delegated selector match tracking and Sizzle createCache
), but we should also consider Map
for such purposes (ponyfilling as needed), especially if Data.js can be updated accordingly—one of @rwaldron’s original goals when creating it.
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
Why is extending native objects a bad practice? - Stack Overflow
When you extend an object, you change its behaviour. Changing the behaviour of an object that will only be used by your own...
Read more >Object prototypes - Learn web development | MDN
Prototypes are the mechanism by which JavaScript objects inherit features from one another. In this article, we explain what a prototype is, how ......
Read more >3. Objects - Programming JavaScript Applications [Book]
Sometimes you don't want to share data on a prototype property. Instead, you want each instance to have its own unique copy of...
Read more >What's wrong with extending the DOM - Perfection Kills
It does not state that there should exist global Element property, ... Being able to extend DOM elements through prototype objects sounds ...
Read more >Collision Overview | Unreal Engine 4.27 Documentation
As stated above, both Actors need to be set to block each other's respective object types. If they do not, they will not...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In my opinion this is a breaking change that should not go into 3.5.0 minor upgrade version. It can break a lot of dependent projects, like this one: https://github.com/snapappointments/bootstrap-select/issues/2430
@rjaros Please submit a new issue with details.