Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
7c2ec67d
Commit
7c2ec67d
authored
Jan 25, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Expose IDOMCustomEvent to scripts.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
757c3025
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
htmlevent.c
dlls/mshtml/htmlevent.c
+13
-0
events.js
dlls/mshtml/tests/events.js
+15
-0
No files found.
dlls/mshtml/htmlevent.c
View file @
7c2ec67d
...
...
@@ -2211,6 +2211,18 @@ static dispex_static_data_t DOMKeyboardEvent_dispex = {
DOMKeyboardEvent_iface_tids
};
static
const
tid_t
DOMCustomEvent_iface_tids
[]
=
{
IDOMEvent_tid
,
IDOMCustomEvent_tid
,
0
};
static
dispex_static_data_t
DOMCustomEvent_dispex
=
{
NULL
,
DispDOMCustomEvent_tid
,
DOMCustomEvent_iface_tids
};
static
BOOL
check_event_iface
(
nsIDOMEvent
*
event
,
REFIID
riid
)
{
nsISupports
*
iface
;
...
...
@@ -2243,6 +2255,7 @@ static DOMEvent *alloc_event(nsIDOMEvent *nsevent, eventid_t event_id)
custom_event
->
event
.
query_interface
=
DOMCustomEvent_query_interface
;
custom_event
->
event
.
destroy
=
DOMCustomEvent_destroy
;
event
=
&
custom_event
->
event
;
dispex_data
=
&
DOMCustomEvent_dispex
;
}
else
if
(
!
event
)
{
event
=
heap_alloc_zero
(
sizeof
(
*
event
));
if
(
!
event
)
...
...
dlls/mshtml/tests/events.js
View file @
7c2ec67d
...
...
@@ -769,6 +769,20 @@ function test_keyboard_event() {
next_test
();
}
function
test_custom_event
()
{
var
e
=
document
.
createEvent
(
"CustomEvent"
);
ok
(
e
.
detail
===
undefined
,
"detail = "
+
e
.
detail
);
e
.
initCustomEvent
(
"test"
,
true
,
false
,
123
);
ok
(
e
.
type
===
"test"
,
"type = "
+
e
.
type
);
ok
(
e
.
bubbles
===
true
,
"bubbles = "
+
e
.
bubbles
);
ok
(
e
.
cancelable
===
false
,
"cancelable = "
+
e
.
cancelable
);
ok
(
e
.
detail
===
123
,
"detail = "
+
e
.
detail
);
next_test
();
}
function
test_error_event
()
{
document
.
body
.
innerHTML
=
'<div><img></img></div>'
;
var
div
=
document
.
body
.
firstChild
;
...
...
@@ -822,6 +836,7 @@ var tests = [
test_ui_event
,
test_mouse_event
,
test_keyboard_event
,
test_custom_event
,
test_error_event
,
test_detached_img_error_event
,
test_time_stamp
,
...
...
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