The more javascript we use, the more it becomes important to have namespaces to avoid function name clashes.
I propose to put all functions in
twiki.js
inside namespace
TWiki
. This will effect javascript calls in pattern skin, and perhaps also other skins and plugins:
to name a few.
AC
I have found these files that include
twiki.js
:
- templates/twiki.tmpl:20
- twikiplugins/ClassicSkin/templates/twiki.classic.tmpl:18
- twikiplugins/PatternSkin/templates/javascript.pattern.tmpl:11
- twikiplugins/QuickMenuSkin/templates/twiki.quickmenu.tmpl:17
- twikiplugins/TwistyPlugin/lib/TWiki/Plugins/TwistyPlugin.pm:81
So that would be:
AC
This has become outdated. See
Item3064 (javascript refactoring).