// Update PID
pid = uidl.getId();
-
if(!hasTemplate()) {
// Update HTML template only once
initializeHTML(uidl, client);
}
}
}
+
+ // Evaluate scripts only once
+ if (scripts != null) {
+ eval(scripts);
+ scripts = null;
+ }
}
/** Initialize HTML-layout. */
return elem.getAttribute("location");
}-*/;
- /** Scripts are evaluated when the document has been rendered */
- protected void onLoad() {
- super.onLoad();
- // Evaluate scripts only once
- if (scripts != null) {
- eval(scripts);
- scripts = null;
- }
- }
-
/** Evaluate given script in browser document */
private static native void eval(String script) /*-{
try {