The only issue I see is that the script should somehow identify itself (i.e. its own script tag)
One may use the script tag source - not good, file name coupling.
One may use a script tag ID - better.
One may use the first line (e.g.) to identify it by using the innerHTML property.
Code: Select all
SCRIPTID = 20