diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c
index 53f8cff7051..94a9e7e72a4 100644
--- a/dlls/mshtml/htmlevent.c
+++ b/dlls/mshtml/htmlevent.c
@@ -28,6 +28,7 @@
#include "mshtml_private.h"
#include "htmlevent.h"
+#include "htmlscript.h"
#include "wine/debug.h"
diff --git a/dlls/mshtml/htmlscript.c b/dlls/mshtml/htmlscript.c
index d6241ae7e35..d5ae39df488 100644
--- a/dlls/mshtml/htmlscript.c
+++ b/dlls/mshtml/htmlscript.c
@@ -29,6 +29,7 @@
#include "wine/debug.h"
#include "mshtml_private.h"
+#include "htmlscript.h"
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
diff --git a/dlls/mshtml/htmlscript.h b/dlls/mshtml/htmlscript.h
new file mode 100644
index 00000000000..d6031bd66ed
--- /dev/null
+++ b/dlls/mshtml/htmlscript.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2012 Jacek Caban for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+typedef struct {
+ HTMLElement element;
+
+ IHTMLScriptElement IHTMLScriptElement_iface;
+
+ nsIDOMHTMLScriptElement *nsscript;
+ BOOL parsed;
+} HTMLScriptElement;
+
+HRESULT script_elem_from_nsscript(HTMLDocumentNode*,nsIDOMHTMLScriptElement*,HTMLScriptElement**) DECLSPEC_HIDDEN;
+void bind_event_scripts(HTMLDocumentNode*) DECLSPEC_HIDDEN;
+
+void release_script_hosts(HTMLInnerWindow*) DECLSPEC_HIDDEN;
+void connect_scripts(HTMLInnerWindow*) DECLSPEC_HIDDEN;
+void doc_insert_script(HTMLInnerWindow*,HTMLScriptElement*) DECLSPEC_HIDDEN;
+IDispatch *script_parse_event(HTMLInnerWindow*,LPCWSTR) DECLSPEC_HIDDEN;
+HRESULT exec_script(HTMLInnerWindow*,const WCHAR*,const WCHAR*,VARIANT*) DECLSPEC_HIDDEN;
+void set_script_mode(HTMLOuterWindow*,SCRIPTMODE) DECLSPEC_HIDDEN;
+BOOL find_global_prop(HTMLInnerWindow*,BSTR,DWORD,ScriptHost**,DISPID*) DECLSPEC_HIDDEN;
+IDispatch *get_script_disp(ScriptHost*) DECLSPEC_HIDDEN;
diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c
index 7122b4b262c..740ac556441 100644
--- a/dlls/mshtml/htmlwindow.c
+++ b/dlls/mshtml/htmlwindow.c
@@ -36,6 +36,7 @@
#include "mshtml_private.h"
#include "htmlevent.h"
+#include "htmlscript.h"
#include "binding.h"
#include "resource.h"
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index dc51565a570..d78e6ab3471 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -743,18 +743,6 @@ void init_binding_ui(HTMLDocumentObj*) DECLSPEC_HIDDEN;
void HTMLDocumentNode_SecMgr_Init(HTMLDocumentNode*) DECLSPEC_HIDDEN;
-typedef struct {
- HTMLElement element;
-
- IHTMLScriptElement IHTMLScriptElement_iface;
-
- nsIDOMHTMLScriptElement *nsscript;
- BOOL parsed;
-} HTMLScriptElement;
-
-HRESULT script_elem_from_nsscript(HTMLDocumentNode*,nsIDOMHTMLScriptElement*,HTMLScriptElement**) DECLSPEC_HIDDEN;
-void bind_event_scripts(HTMLDocumentNode*) DECLSPEC_HIDDEN;
-
HRESULT HTMLCurrentStyle_Create(HTMLElement*,IHTMLCurrentStyle**) DECLSPEC_HIDDEN;
void ConnectionPoint_Init(ConnectionPoint*,ConnectionPointContainer*,REFIID,cp_static_data_t*) DECLSPEC_HIDDEN;
@@ -918,14 +906,6 @@ HRESULT get_elem(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN
HTMLElement *unsafe_impl_from_IHTMLElement(IHTMLElement*) DECLSPEC_HIDDEN;
-void release_script_hosts(HTMLInnerWindow*) DECLSPEC_HIDDEN;
-void connect_scripts(HTMLInnerWindow*) DECLSPEC_HIDDEN;
-void doc_insert_script(HTMLInnerWindow*,HTMLScriptElement*) DECLSPEC_HIDDEN;
-IDispatch *script_parse_event(HTMLInnerWindow*,LPCWSTR) DECLSPEC_HIDDEN;
-HRESULT exec_script(HTMLInnerWindow*,const WCHAR*,const WCHAR*,VARIANT*) DECLSPEC_HIDDEN;
-void set_script_mode(HTMLOuterWindow*,SCRIPTMODE) DECLSPEC_HIDDEN;
-BOOL find_global_prop(HTMLInnerWindow*,BSTR,DWORD,ScriptHost**,DISPID*) DECLSPEC_HIDDEN;
-IDispatch *get_script_disp(ScriptHost*) DECLSPEC_HIDDEN;
HRESULT search_window_props(HTMLInnerWindow*,BSTR,DWORD,DISPID*) DECLSPEC_HIDDEN;
HRESULT get_frame_by_name(HTMLOuterWindow*,const WCHAR*,BOOL,HTMLOuterWindow**) DECLSPEC_HIDDEN;
HRESULT get_doc_elem_by_id(HTMLDocumentNode*,const WCHAR*,HTMLElement**) DECLSPEC_HIDDEN;
diff --git a/dlls/mshtml/mutation.c b/dlls/mshtml/mutation.c
index d765b02a6b6..8c456215e9b 100644
--- a/dlls/mshtml/mutation.c
+++ b/dlls/mshtml/mutation.c
@@ -30,6 +30,7 @@
#include "shlguid.h"
#include "mshtml_private.h"
+#include "htmlscript.h"
#include "htmlevent.h"
#include "wine/debug.h"
diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c
index bec5ed68174..8554ddb22ed 100644
--- a/dlls/mshtml/navigate.c
+++ b/dlls/mshtml/navigate.c
@@ -40,6 +40,7 @@
#include "wine/debug.h"
#include "mshtml_private.h"
+#include "htmlscript.h"
#include "binding.h"
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
diff --git a/dlls/mshtml/nsevents.c b/dlls/mshtml/nsevents.c
index 4f970df2dd2..7f66f17f15d 100644
--- a/dlls/mshtml/nsevents.c
+++ b/dlls/mshtml/nsevents.c
@@ -32,6 +32,7 @@
#include "wine/debug.h"
#include "mshtml_private.h"
+#include "htmlscript.h"
#include "htmlevent.h"
#include "resource.h"
diff --git a/dlls/mshtml/persist.c b/dlls/mshtml/persist.c
index 72711cafd98..b518b569248 100644
--- a/dlls/mshtml/persist.c
+++ b/dlls/mshtml/persist.c
@@ -38,6 +38,7 @@
#include "wine/debug.h"
#include "mshtml_private.h"
+#include "htmlscript.h"
#include "htmlevent.h"
#include "binding.h"
#include "resource.h"
diff --git a/dlls/mshtml/script.c b/dlls/mshtml/script.c
index dca0b57d078..730881b283b 100644
--- a/dlls/mshtml/script.c
+++ b/dlls/mshtml/script.c
@@ -33,6 +33,7 @@
#include "wine/debug.h"
#include "mshtml_private.h"
+#include "htmlscript.h"
#include "pluginhost.h"
#include "htmlevent.h"
#include "binding.h"