TreeViewAdapter.js causes a JavaScript warning in FireFox strict mode.
Repro steps:
1. Enable strict mode in FireFox:
A. Type "about:config" in the address bar.
B. Set "javascript:options:strict" to true.
2. Browse to http://www.asp.net/cssadapters/TreeView.aspx
3. Tools->JavaScript Console.
Warning: redeclaration of function TogglePlusMinus__AspNetTreeView
Source File: http://www.asp.net/cssadapters/JavaScript/TreeViewAdapter.js
Line: 22, Column: 9
Source Code:
function TogglePlusMinus__AspNetTreeView(element, showPlus)
It looks like this function is intended to be an overload of TogglePlusMinus__AspNetTreeView(element), but JavaScript does not support function overloading like this. At most one function can be defined with a given name, regardless of
the number of parameters.
mharder
Contributor
4567 Points
917 Posts
Microsoft
JavaScript warning in TreeViewAdapter.js
Apr 27, 2006 06:54 PM|LINK
Repro steps:
1. Enable strict mode in FireFox:
A. Type "about:config" in the address bar.
B. Set "javascript:options:strict" to true.
2. Browse to http://www.asp.net/cssadapters/TreeView.aspx
3. Tools->JavaScript Console.
Warning: redeclaration of function TogglePlusMinus__AspNetTreeView
Source File: http://www.asp.net/cssadapters/JavaScript/TreeViewAdapter.js
Line: 22, Column: 9
Source Code:
function TogglePlusMinus__AspNetTreeView(element, showPlus)
It looks like this function is intended to be an overload of TogglePlusMinus__AspNetTreeView(element), but JavaScript does not support function overloading like this. At most one function can be defined with a given name, regardless of the number of parameters.
-Mike
This posting is provided "AS IS" with no warranties, and confers no rights.