Hello everyone,
Today I stumbled on a nasty bug completely unrelated to CodeMirror… The library (FileAPI) was completely crashing when it tried to grab the ‘name’ property of some objects. The problem in this part of code is that it can also receive strings, but they were getting treated as objects because of the name method introduced in the String prototype by CodeMirror.
The most basic javascript rule is to create separate functionalities into modules so they don’t clash against each others. Both CodeMirror and FileAPI are loading in the correct fashion but there is still (of course) a clash because of prototype modifications of the most basic javascript objects.
Even though I certainly could understand the motivation behind this, I doubt it is an absolute need. Are there any plans on refactoring the library so it does not rely on those prototypes?