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?
variableName = function() {};
produces undefined is not a function
, whilefunction functionName() {}
produces functionName is not defined
.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.
Comments