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
74d6c6d2
Commit
74d6c6d2
authored
Feb 22, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Properly support custom event listeners in XMLHttpRequest object.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d7c94cc7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
events.js
dlls/mshtml/tests/events.js
+12
-0
xmlhttprequest.c
dlls/mshtml/xmlhttprequest.c
+1
-3
No files found.
dlls/mshtml/tests/events.js
View file @
74d6c6d2
...
...
@@ -538,6 +538,18 @@ function test_dispatch_event() {
ok
(
calls
===
"parent.testing(capture),child.testing(capture),"
+
"child.testing(bubble),parent.testing(bubble),"
,
"calls = "
+
calls
);
var
xhr
=
new
XMLHttpRequest
();
xhr
.
addEventListener
(
"testing"
,
function
(
event
)
{
ok
(
event
===
e
,
"event != e"
);
ok
(
event
.
target
===
xhr
,
"target != child"
);
ok
(
event
.
srcElement
===
null
,
"srcElement != child"
);
calls
+=
"xhr.testing"
;
},
true
);
calls
=
""
;
xhr
.
dispatchEvent
(
e
);
ok
(
calls
===
"xhr.testing"
,
"calls = "
+
calls
);
next_test
();
}
...
...
dlls/mshtml/xmlhttprequest.c
View file @
74d6c6d2
...
...
@@ -755,9 +755,7 @@ static void HTMLXMLHttpRequest_bind_event(DispatchEx *dispex, eventid_t eid)
TRACE
(
"(%p)
\n
"
,
This
);
assert
(
eid
==
EVENTID_READYSTATECHANGE
);
if
(
This
->
event_listener
)
if
(
eid
!=
EVENTID_READYSTATECHANGE
||
This
->
event_listener
)
return
;
This
->
event_listener
=
heap_alloc
(
sizeof
(
*
This
->
event_listener
));
...
...
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