Skip to content
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

Technical concern over modification of Boolean.prototype #2258

Open
kronaemmanuel opened this issue Jun 5, 2024 · 1 comment
Open

Technical concern over modification of Boolean.prototype #2258

kronaemmanuel opened this issue Jun 5, 2024 · 1 comment
Labels

Comments

@kronaemmanuel
Copy link

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.

@kdinev
Copy link
Member

kdinev commented Jul 23, 2024

@kronaemmanuel We have considered removing the util file, which comprises the majority of infragistics.core.js, altogether. It's not longer a necessary, since all of the things it used to be good for are now natively available in the ECMAscript spec and supported by all browsers. The time investment, however, would be significant and I cannot currently make a commitment whether I will be able to prioritise this high enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants