question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Event types colliding with Object prototype properties don't work

See original GitHub issue

We 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:closed
  • Created 7 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
rjaroscommented, Apr 11, 2020

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

0reactions
mgolcommented, Apr 11, 2020

@rjaros Please submit a new issue with details.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found