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
e79e4098
Commit
e79e4098
authored
Sep 08, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 09, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Fire beforeunload event on body element.
parent
603d8ed9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
htmlevent.c
dlls/mshtml/htmlevent.c
+17
-1
No files found.
dlls/mshtml/htmlevent.c
View file @
e79e4098
...
...
@@ -98,9 +98,10 @@ typedef struct {
#define EVENT_DEFAULTLISTENER 0x0001
#define EVENT_BUBBLE 0x0002
#define EVENT_FORWARDBODY 0x0004
static
const
event_info_t
event_info
[]
=
{
{
beforeunloadW
,
onbeforeunloadW
,
EVENT_DEFAULTLISTENER
},
{
beforeunloadW
,
onbeforeunloadW
,
EVENT_DEFAULTLISTENER
|
EVENT_FORWARDBODY
},
{
blurW
,
onblurW
,
EVENT_DEFAULTLISTENER
},
{
changeW
,
onchangeW
,
EVENT_DEFAULTLISTENER
|
EVENT_BUBBLE
},
{
clickW
,
onclickW
,
EVENT_DEFAULTLISTENER
|
EVENT_BUBBLE
},
...
...
@@ -771,6 +772,21 @@ void fire_event(HTMLDocument *doc, eventid_t eid, nsIDOMNode *target, nsIDOMEven
break
;
case
DOCUMENT_NODE
:
if
(
event_info
[
eid
].
flags
&
EVENT_FORWARDBODY
)
{
nsIDOMHTMLElement
*
nsbody
;
nsresult
nsres
;
nsres
=
nsIDOMHTMLDocument_GetBody
(
doc
->
nsdoc
,
&
nsbody
);
if
(
NS_SUCCEEDED
(
nsres
)
&&
nsbody
)
{
node
=
get_node
(
doc
,
(
nsIDOMNode
*
)
nsbody
,
FALSE
);
if
(
node
)
call_event_handlers
(
doc
,
event_obj
,
*
get_node_event_target
(
node
),
eid
,
(
IDispatch
*
)
HTMLDOMNODE
(
node
));
nsIDOMHTMLElement_Release
(
nsbody
);
}
else
{
ERR
(
"Could not get body: %08x
\n
"
,
nsres
);
}
}
call_event_handlers
(
doc
,
event_obj
,
doc
->
event_target
,
eid
,
(
IDispatch
*
)
HTMLDOC
(
doc
));
break
;
...
...
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