2012-10-16 17:07:29 +02:00
|
|
|
/*
|
|
|
|
* 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
|
|
|
|
*/
|
|
|
|
|
2017-04-20 16:09:29 +02:00
|
|
|
struct HTMLScriptElement {
|
2012-10-16 17:07:29 +02:00
|
|
|
HTMLElement element;
|
|
|
|
|
|
|
|
IHTMLScriptElement IHTMLScriptElement_iface;
|
|
|
|
|
|
|
|
nsIDOMHTMLScriptElement *nsscript;
|
|
|
|
BOOL parsed;
|
2012-10-16 17:09:52 +02:00
|
|
|
BOOL parse_on_bind;
|
2014-12-24 13:10:21 +01:00
|
|
|
BOOL pending_readystatechange_event;
|
2014-10-09 16:08:47 +02:00
|
|
|
READYSTATE readystate;
|
2016-07-19 18:39:47 +02:00
|
|
|
WCHAR *src_text; /* sctipt text downloaded from src */
|
2016-07-19 18:42:06 +02:00
|
|
|
BSCallback *binding; /* weak reference to current binding */
|
2017-04-20 16:09:29 +02:00
|
|
|
};
|
2012-10-16 17:07:29 +02:00
|
|
|
|
2012-10-16 17:08:25 +02:00
|
|
|
typedef struct {
|
|
|
|
struct list entry;
|
|
|
|
HTMLScriptElement *script;
|
|
|
|
} script_queue_entry_t;
|
|
|
|
|
2018-02-19 14:49:39 +01:00
|
|
|
HRESULT script_elem_from_nsscript(nsIDOMHTMLScriptElement*,HTMLScriptElement**) DECLSPEC_HIDDEN;
|
2012-10-16 17:07:29 +02:00
|
|
|
void bind_event_scripts(HTMLDocumentNode*) DECLSPEC_HIDDEN;
|
2016-07-19 18:42:06 +02:00
|
|
|
HRESULT load_script(HTMLScriptElement*,const WCHAR*,BOOL) DECLSPEC_HIDDEN;
|
2012-10-16 17:07:29 +02:00
|
|
|
|
|
|
|
void release_script_hosts(HTMLInnerWindow*) DECLSPEC_HIDDEN;
|
|
|
|
void connect_scripts(HTMLInnerWindow*) DECLSPEC_HIDDEN;
|
2016-07-19 18:41:06 +02:00
|
|
|
void doc_insert_script(HTMLInnerWindow*,HTMLScriptElement*,BOOL) DECLSPEC_HIDDEN;
|
2012-10-16 17:07:29 +02:00
|
|
|
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;
|