This name probably helps a little, but I tried. In any case, I ran into this extremely cryptic (and disappointing) error resulting in RangeError: Maximum call stack size exceeded in some OO JS that I wrote. Took me a couple of hours, but I finally got to it. Here is a simple example that will throw the same exception:
// Class var Foo = function(){ // "Public" function this.bar = function(){ console.log('loop!'); $(this).trigger('bar'); } } var foo = new Foo(); $(foo).trigger('bar');
Running this code will cause loop! will be written to the console for a ton of times before ultimately leading to the exclusion of the range.
Obviously, something about the jQuery trigger function, which I donโt understand, and it boils down to the following: why call the foo bar function at all? Yes, the event name and the function name of the class are the same, but I do not understand how the two are related.
source share