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
03d26802
Commit
03d26802
authored
Apr 22, 2007
by
Brandon Aaron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding back modified test for #939
parent
e0aa10a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
eventTest.js
src/event/eventTest.js
+20
-2
No files found.
src/event/eventTest.js
View file @
03d26802
module
(
"event"
);
module
(
"event"
);
test
(
"bind()"
,
function
()
{
test
(
"bind()"
,
function
()
{
expect
(
9
);
expect
(
10
);
var
handler
=
function
(
event
)
{
var
handler
=
function
(
event
)
{
ok
(
event
.
data
,
"bind() with data, check passed data exists"
);
ok
(
event
.
data
,
"bind() with data, check passed data exists"
);
...
@@ -17,7 +17,25 @@ test("bind()", function() {
...
@@ -17,7 +17,25 @@ test("bind()", function() {
ok
(
data
.
bar
==
"foo"
,
"Check value of trigger data"
);
ok
(
data
.
bar
==
"foo"
,
"Check value of trigger data"
);
}
}
$
(
"#firstp"
).
bind
(
"click"
,
{
foo
:
"bar"
},
handler
).
trigger
(
"click"
,
[{
bar
:
"foo"
}]);
$
(
"#firstp"
).
bind
(
"click"
,
{
foo
:
"bar"
},
handler
).
trigger
(
"click"
,
[{
bar
:
"foo"
}]);
// events don't work with iframes, see #939
var
tmp
=
document
.
createElement
(
'iframe'
);
document
.
body
.
appendChild
(
tmp
);
var
doc
=
tmp
.
contentWindow
.
document
;
doc
.
open
();
doc
.
write
(
"<html><body><input type='text'/></body></html>"
);
doc
.
close
();
var
input
=
doc
.
getElementsByTagName
(
"input"
)[
0
];
$
(
input
).
bind
(
"click"
,
function
()
{
ok
(
true
,
"Binding to element inside iframe"
);
});
triggerEvent
(
input
,
"click"
);
document
.
body
.
removeChild
(
tmp
);
var
counter
=
0
;
var
counter
=
0
;
function
selectOnChange
(
event
)
{
function
selectOnChange
(
event
)
{
equals
(
event
.
data
,
counter
++
,
"Event.data is not a global event object"
);
equals
(
event
.
data
,
counter
++
,
"Event.data is not a global event object"
);
...
...
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