diff --git a/draft/library/wsf_js_widget/kernel/webcontrol/wsf_page_control.e b/draft/library/wsf_js_widget/kernel/webcontrol/wsf_page_control.e
index 143d451f..032f8c71 100644
--- a/draft/library/wsf_js_widget/kernel/webcontrol/wsf_page_control.e
+++ b/draft/library/wsf_js_widget/kernel/webcontrol/wsf_page_control.e
@@ -142,6 +142,16 @@ feature -- Implementation
Result.append ("")
+ if attached additional_javascripts as ajs then
+ across
+ ajs as js
+ loop
+ Result.append ("")
+ end
+ end
Result.append ("")
@@ -149,6 +159,16 @@ feature -- Implementation
else
Result.append ("
")
Result.append (control.render)
+ if attached additional_javascripts as ajs then
+ across
+ ajs as js
+ loop
+ Result.append ("")
+ end
+ end
Result.append ("")
@@ -175,6 +195,19 @@ feature -- Implementation
end
end
+ add_javascript (path: STRING_32)
+ local
+ ajs: attached like additional_javascripts
+ do
+ if attached additional_javascripts as aajs then
+ ajs := aajs
+ else
+ create ajs.make (1)
+ end
+ ajs.extend (path)
+ additional_javascripts := ajs
+ end
+
feature -- Event handling
handle_callback (cname: LIST [STRING_32]; event: STRING_32; event_parameter: detachable ANY)
@@ -226,4 +259,7 @@ feature {NONE} -- Root control
control: WSF_CONTROL
-- The root control of this page
+ additional_javascripts: detachable ARRAYED_LIST [STRING_32]
+ -- List containing the additional javascipt files
+
end