Some (not all) of the html documents generated by Seaside have these elements in it:
<body onload="onLoad()">
<script type="text/javascript">/*<![CDATA[*/function onLoad(){};/*]]>*/</script>
I do not use any Javascript in these documents and i wonder, where this comes from, and if/how i can prevent these parts from being added.
Seaside generates this markup in the class WADefaultScriptGenerator
. Unfortunately the markup needs to be generated even if you don't use Javascript, as this is not know when Seaside opens the <body>
tag.
You can customize (or avoid the Javascript markup generation) by subclassing WAScriptGenerator
and setting your custom class in the application configuration. Either through the configuration interface or programmatically:
application := WAAdmin register: MyRootComponent asApplicationAt: 'myapp'.
application preferenceAt: #scriptGeneratorClass put: MyScriptGenerator.