1*c2c66affSColin Finck /* 2*c2c66affSColin Finck * Copyright 2012 Jacek Caban for CodeWeavers 3*c2c66affSColin Finck * 4*c2c66affSColin Finck * This library is free software; you can redistribute it and/or 5*c2c66affSColin Finck * modify it under the terms of the GNU Lesser General Public 6*c2c66affSColin Finck * License as published by the Free Software Foundation; either 7*c2c66affSColin Finck * version 2.1 of the License, or (at your option) any later version. 8*c2c66affSColin Finck * 9*c2c66affSColin Finck * This library is distributed in the hope that it will be useful, 10*c2c66affSColin Finck * but WITHOUT ANY WARRANTY; without even the implied warranty of 11*c2c66affSColin Finck * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12*c2c66affSColin Finck * Lesser General Public License for more details. 13*c2c66affSColin Finck * 14*c2c66affSColin Finck * You should have received a copy of the GNU Lesser General Public 15*c2c66affSColin Finck * License along with this library; if not, write to the Free Software 16*c2c66affSColin Finck * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 17*c2c66affSColin Finck */ 18*c2c66affSColin Finck 19*c2c66affSColin Finck #pragma once 20*c2c66affSColin Finck 21*c2c66affSColin Finck typedef struct { 22*c2c66affSColin Finck HTMLElement element; 23*c2c66affSColin Finck 24*c2c66affSColin Finck IHTMLScriptElement IHTMLScriptElement_iface; 25*c2c66affSColin Finck 26*c2c66affSColin Finck nsIDOMHTMLScriptElement *nsscript; 27*c2c66affSColin Finck BOOL parsed; 28*c2c66affSColin Finck BOOL parse_on_bind; 29*c2c66affSColin Finck BOOL pending_readystatechange_event; 30*c2c66affSColin Finck READYSTATE readystate; 31*c2c66affSColin Finck } HTMLScriptElement; 32*c2c66affSColin Finck 33*c2c66affSColin Finck typedef struct { 34*c2c66affSColin Finck struct list entry; 35*c2c66affSColin Finck HTMLScriptElement *script; 36*c2c66affSColin Finck } script_queue_entry_t; 37*c2c66affSColin Finck 38*c2c66affSColin Finck HRESULT script_elem_from_nsscript(HTMLDocumentNode*,nsIDOMHTMLScriptElement*,HTMLScriptElement**) DECLSPEC_HIDDEN; 39*c2c66affSColin Finck void bind_event_scripts(HTMLDocumentNode*) DECLSPEC_HIDDEN; 40*c2c66affSColin Finck 41*c2c66affSColin Finck void release_script_hosts(HTMLInnerWindow*) DECLSPEC_HIDDEN; 42*c2c66affSColin Finck void connect_scripts(HTMLInnerWindow*) DECLSPEC_HIDDEN; 43*c2c66affSColin Finck void doc_insert_script(HTMLInnerWindow*,HTMLScriptElement*) DECLSPEC_HIDDEN; 44*c2c66affSColin Finck IDispatch *script_parse_event(HTMLInnerWindow*,LPCWSTR) DECLSPEC_HIDDEN; 45*c2c66affSColin Finck HRESULT exec_script(HTMLInnerWindow*,const WCHAR*,const WCHAR*,VARIANT*) DECLSPEC_HIDDEN; 46*c2c66affSColin Finck void set_script_mode(HTMLOuterWindow*,SCRIPTMODE) DECLSPEC_HIDDEN; 47*c2c66affSColin Finck BOOL find_global_prop(HTMLInnerWindow*,BSTR,DWORD,ScriptHost**,DISPID*) DECLSPEC_HIDDEN; 48*c2c66affSColin Finck IDispatch *get_script_disp(ScriptHost*) DECLSPEC_HIDDEN; 49