I have a Javascript function called many times from many pages.
Inside this function I have to check the element which is invoked this function.
I know a method to pass ‘this’ with the function call. I cannot use that method. Because I am working only on a single module.
There are many other modules using this function. So if I change the function definition it will throw error for other modules/pages.
Is there any other way to find the invoked element without passing ‘this’ or without changing the function definition.
Are you sure it will throw an error? It’s perfectly legal to call a javascript function without passing in all the arguments.
Passing in too many arguments is also legal, you access them with the
argumentsvariable.