Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
f8b27f16
Commit
f8b27f16
authored
Apr 04, 2013
by
Richard Gibson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ref
65a66489
: oldIE handholding for native event tests
parent
58b8535d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
event.js
test/unit/event.js
+8
-1
No files found.
test/unit/event.js
View file @
f8b27f16
...
@@ -1490,7 +1490,7 @@ test("jQuery.Event( type, props )", function() {
...
@@ -1490,7 +1490,7 @@ test("jQuery.Event( type, props )", function() {
test
(
"jQuery.Event properties"
,
function
(){
test
(
"jQuery.Event properties"
,
function
(){
expect
(
12
);
expect
(
12
);
var
handler
,
var
handler
,
event
,
$structure
=
jQuery
(
"<div id='ancestor'><p id='delegate'><span id='target'>shiny</span></p></div>"
),
$structure
=
jQuery
(
"<div id='ancestor'><p id='delegate'><span id='target'>shiny</span></p></div>"
),
$target
=
$structure
.
find
(
"#target"
);
$target
=
$structure
.
find
(
"#target"
);
...
@@ -1517,12 +1517,19 @@ test("jQuery.Event properties", function(){
...
@@ -1517,12 +1517,19 @@ test("jQuery.Event properties", function(){
handler
=
function
(
e
)
{
handler
=
function
(
e
)
{
strictEqual
(
e
.
isTrigger
,
undefined
,
"native event at "
+
this
.
id
);
strictEqual
(
e
.
isTrigger
,
undefined
,
"native event at "
+
this
.
id
);
event
=
e
;
};
};
$target
.
one
(
"click"
,
handler
);
$target
.
one
(
"click"
,
handler
);
$target
[
0
].
onclick
=
function
(
e
)
{
$target
[
0
].
onclick
=
function
(
e
)
{
strictEqual
(
e
.
isTrigger
,
undefined
,
"native event at target (native handler)"
);
strictEqual
(
e
.
isTrigger
,
undefined
,
"native event at target (native handler)"
);
$target
[
0
].
onclick
=
null
;
};
};
fireNative
(
$target
[
0
],
"click"
);
fireNative
(
$target
[
0
],
"click"
);
// Make sure that even oldIE executes the inline handler
if
(
$target
[
0
].
onclick
)
{
$target
[
0
].
onclick
(
event
);
}
});
});
test
(
".delegate()/.undelegate()"
,
function
()
{
test
(
".delegate()/.undelegate()"
,
function
()
{
...
...
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