“Stack overflow in line 0” on Internet Explorer

后端 未结 13 2068
时光取名叫无心
时光取名叫无心 2020-12-14 00:48

I realise this is not the ideal place to ask about this in terms of searchability, but I\'ve got a page whose JavaScript code throws \"Stack overflow in line 0\" errors when

相关标签:
13条回答
  • 2020-12-14 01:01

    I don't know what to tell you, but the same problem occured with jQuery table sorting and SEARCH. When there is nothing left in the table, where you are searching a string for example, you get this error too. Even in Google Analytics this error occurs often.

    0 讨论(0)
  • 2020-12-14 01:05

    1. Internet Options
    2. Tools
    3. Internet options
    4. Advanced
    5. Navigation section
    6. Click > Disable script debugging

      display a notification about every script error

    7. sign in
    8. You will smile !

    0 讨论(0)
  • 2020-12-14 01:08

    In my case I had two functions a() and b(). First was calling second and second was calling first one:

    var i = 0;
    function a() { b(); }
    function b() {
      i++; 
      if (i < 30) {
        a();
      }
    }
    
    a();
    

    I resolved this using setTimeout:

    var i = 0;
    function a() { b(); }
    function b() {
      i++; 
      if (i < 30) {
        setTimeout( function() {
          a();
        }, 0);
      }
    }
    
    a();
    
    0 讨论(0)
  • 2020-12-14 01:10

    My was "at line 1" instead but...

    I got this problem when using jQuery's .clone method. I replaced these by using making jQuery objects from the html string: $($(selector).html()).

    0 讨论(0)
  • 2020-12-14 01:13

    If you came here because you had the problem inside your selenium tests: IE doesn't like By.id("xyz"). Use By.name, xpath, or whatever instead.

    0 讨论(0)
  • 2020-12-14 01:15

    I have reproduced the same error on IE8. One of the text boxes has some event handlers to replace not valid data.

    $('.numbersonly').on("keyup input propertychange", function () {
        //code
    });
    

    The error message was shown on entering data to this text box. We removed event "propertychange" from the code above and now it works correctly.

    P.S. maybe it will help somebody

    0 讨论(0)
提交回复
热议问题