IgniteUI / ignite-ui

Ignite UI for jQuery by Infragistics
https://bit.ly/2kuu1fT
Other
477 stars 84 forks source link

Technical concern over modification of `Boolean.prototype` #2258

Open kronaemmanuel opened 1 month ago

kronaemmanuel commented 1 month ago

Description

This is more of a technical concern rather than a bug report. I'm a developer at Bryntum. Due to a recent customer report, I noticed that when using Bryntum Gantt along with infragistics.core.js file, we get a bug in out code. The bug happens because infragistics.core.js is modifying Boolean.prototype which is causing unintended side effects. In particular the getType() function on Boolean.prototype. Our code was mistakenly trying to process this method. I have changed code on our side, made it more robust so we dont accidentally process unexpected methods, to fix the bug. But I wanted to raise this concern with you. Modifying native prototypes, such as Boolean.prototype isn't a good practice because it affects all booleans throughout the application. This can lead to conflicts, especially in larger codebases where multiple libraries are used together.

Please consider using safer alternatives which do not involve altering native prototypes. Looking forward to your thoughts on this.