Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
e560a224
Commit
e560a224
authored
Nov 09, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLWindow2::execScript implementation.
parent
3bb40b07
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
2 deletions
+41
-2
htmlwindow.c
dlls/mshtml/htmlwindow.c
+4
-2
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
script.c
dlls/mshtml/script.c
+36
-0
No files found.
dlls/mshtml/htmlwindow.c
View file @
e560a224
...
...
@@ -1140,8 +1140,10 @@ static HRESULT WINAPI HTMLWindow2_execScript(IHTMLWindow2 *iface, BSTR scode, BS
VARIANT
*
pvarRet
)
{
HTMLWindow
*
This
=
HTMLWINDOW2_THIS
(
iface
);
FIXME
(
"(%p)->(%s %s %p)
\n
"
,
This
,
debugstr_w
(
scode
),
debugstr_w
(
language
),
pvarRet
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%s %s %p)
\n
"
,
This
,
debugstr_w
(
scode
),
debugstr_w
(
language
),
pvarRet
);
return
exec_script
(
This
,
scode
,
language
,
pvarRet
);
}
static
HRESULT
WINAPI
HTMLWindow2_toString
(
IHTMLWindow2
*
iface
,
BSTR
*
String
)
...
...
dlls/mshtml/mshtml_private.h
View file @
e560a224
...
...
@@ -856,6 +856,7 @@ void release_script_hosts(HTMLWindow*);
void
connect_scripts
(
HTMLWindow
*
);
void
doc_insert_script
(
HTMLWindow
*
,
nsIDOMHTMLScriptElement
*
);
IDispatch
*
script_parse_event
(
HTMLWindow
*
,
LPCWSTR
);
HRESULT
exec_script
(
HTMLWindow
*
,
const
WCHAR
*
,
const
WCHAR
*
,
VARIANT
*
);
void
set_script_mode
(
HTMLWindow
*
,
SCRIPTMODE
);
BOOL
find_global_prop
(
HTMLWindow
*
,
BSTR
,
DWORD
,
ScriptHost
**
,
DISPID
*
);
IDispatch
*
get_script_disp
(
ScriptHost
*
);
...
...
dlls/mshtml/script.c
View file @
e560a224
...
...
@@ -874,6 +874,42 @@ IDispatch *script_parse_event(HTMLWindow *window, LPCWSTR text)
return
disp
;
}
HRESULT
exec_script
(
HTMLWindow
*
window
,
const
WCHAR
*
code
,
const
WCHAR
*
lang
,
VARIANT
*
ret
)
{
ScriptHost
*
script_host
;
EXCEPINFO
ei
;
GUID
guid
;
HRESULT
hres
;
static
const
WCHAR
delimW
[]
=
{
'"'
,
0
};
if
(
!
get_guid_from_language
(
lang
,
&
guid
))
{
WARN
(
"Could not find script GUID
\n
"
);
return
CO_E_CLASSSTRING
;
}
script_host
=
get_script_host
(
window
,
&
guid
);
if
(
!
script_host
)
{
FIXME
(
"No script host
\n
"
);
return
E_FAIL
;
}
if
(
!
script_host
->
parse
)
{
FIXME
(
"script_host->parse == NULL
\n
"
);
return
E_FAIL
;
}
memset
(
&
ei
,
0
,
sizeof
(
ei
));
TRACE
(
">>>
\n
"
);
hres
=
IActiveScriptParse64_ParseScriptText
(
script_host
->
parse
,
code
,
NULL
,
NULL
,
delimW
,
0
,
0
,
SCRIPTTEXT_ISVISIBLE
,
ret
,
&
ei
);
if
(
SUCCEEDED
(
hres
))
TRACE
(
"<<<
\n
"
);
else
WARN
(
"<<< %08x
\n
"
,
hres
);
return
hres
;
}
IDispatch
*
get_script_disp
(
ScriptHost
*
script_host
)
{
IDispatch
*
disp
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment