Methods from Javascript file will load in IE but not Chrome

octothorpentine

The webpage is loading several different javascript files, all of which show up correctly in the "sources" tab of Chrome's console, however trying to call methods from one of the pages results in the console showing either "Uncaught Reference Error: undefined is not a function" or "Uncaught Reference Error: [name of function] is not defined" depending on the way the function is declared1. There's also an error in the Chrome console for "Uncaught SyntaxError: Invalid left-hand side in assignment" coming from the page that won't load, but that isn't present in IE. That error comes from the following function:

ListOfNumbers.prototype.reset = function () {
    this = new ListOfNumbers;
};

Why can't I access any of the functions on that page?


1 The difference in error messages is that

  1. variableName = function() {}; produces undefined is not a function, while
  2. function functionName() {} produces functionName is not defined.
octothorpentine

The invalid left-hand side error is explained in Javascript function using “this = ” gives “Invalid left-hand side in assignment”. IE will give that same error if you try to run the function, which you can see for yourself by entering

var test = new ListOfNumbers(); test.reset();

in IE's console.

IE only detects the error when attempting to run the function, but Chrome will detect it on page load and then prevent anything in that javascript file from running, even though it will still show the file under "Sources". Fixing the invalid left-hand side should also solve the Chrome problem.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

Chrome Development Tool: [VM] file from javascript

From Dev

Javascript not reloading page when I switched to Chrome from IE

From Dev

Javascript-generated .ics file opens in Chrome and Firefox, but not in IE

From Dev

IE throwing JavaScript TypeError but not on chrome

From Dev

JavaScript load image file from a different directory

From Dev

JavaScript load a file not from cache

From Dev

How to get the fileName in javascript from input file tag in IE browser

From Dev

JavaScript Chrome vs IE

From Dev

Chrome extension: Could not load javascript file

From Dev

Launch IE from a link in Chrome

From Dev

D3.js - load csv file from chrome

From Dev

Load text from local .txt file into html textarea using JavaScript

From Dev

Rails Assets Pipeline load JavaScript from controllers and methods

From Dev

How to Input and Output {Local text file} instead of using ActiveXObject (latest version of Chrome or IE 11) using JavaScript

From Dev

Is it possible to load external javascript files (from URLs) from the console, in chrome?

From Dev

Angular2 load component from external file with javascript

From Dev

Load 2d array from file in javascript

From Dev

Javascript: can't load JSON file from localhost

From Dev

Load a javascript object from file in nodejs, parse error

From Dev

Javascript-generated .ics file opens in Chrome and Firefox, but not in IE

From Dev

JavaScript load a file not from cache

From Dev

JavaScript Chrome vs IE

From Dev

JavaScript OOP and asynchronous methods from Chrome extension api

From Dev

javascript mailto works in chrome but not IE

From Dev

Load html file from file system with chrome-extension

From Dev

How to Input and Output {Local text file} instead of using ActiveXObject (latest version of Chrome or IE 11) using JavaScript

From Dev

How to load javascript file from another directory

From Dev

Load data from xml file - Javascript

From Dev

Load javascript file from other domain in bookmarklet?

Related Related

  1. 1

    Chrome Development Tool: [VM] file from javascript

  2. 2

    Javascript not reloading page when I switched to Chrome from IE

  3. 3

    Javascript-generated .ics file opens in Chrome and Firefox, but not in IE

  4. 4

    IE throwing JavaScript TypeError but not on chrome

  5. 5

    JavaScript load image file from a different directory

  6. 6

    JavaScript load a file not from cache

  7. 7

    How to get the fileName in javascript from input file tag in IE browser

  8. 8

    JavaScript Chrome vs IE

  9. 9

    Chrome extension: Could not load javascript file

  10. 10

    Launch IE from a link in Chrome

  11. 11

    D3.js - load csv file from chrome

  12. 12

    Load text from local .txt file into html textarea using JavaScript

  13. 13

    Rails Assets Pipeline load JavaScript from controllers and methods

  14. 14

    How to Input and Output {Local text file} instead of using ActiveXObject (latest version of Chrome or IE 11) using JavaScript

  15. 15

    Is it possible to load external javascript files (from URLs) from the console, in chrome?

  16. 16

    Angular2 load component from external file with javascript

  17. 17

    Load 2d array from file in javascript

  18. 18

    Javascript: can't load JSON file from localhost

  19. 19

    Load a javascript object from file in nodejs, parse error

  20. 20

    Javascript-generated .ics file opens in Chrome and Firefox, but not in IE

  21. 21

    JavaScript load a file not from cache

  22. 22

    JavaScript Chrome vs IE

  23. 23

    JavaScript OOP and asynchronous methods from Chrome extension api

  24. 24

    javascript mailto works in chrome but not IE

  25. 25

    Load html file from file system with chrome-extension

  26. 26

    How to Input and Output {Local text file} instead of using ActiveXObject (latest version of Chrome or IE 11) using JavaScript

  27. 27

    How to load javascript file from another directory

  28. 28

    Load data from xml file - Javascript

  29. 29

    Load javascript file from other domain in bookmarklet?

HotTag

Archive