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
4460d5ad
Commit
4460d5ad
authored
May 04, 2009
by
Brandon Aaron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unit tests for using jQuery events on non-dom elements. fixes #3439. thanks morgan
parent
31b57318
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
event.js
test/unit/event.js
+21
-0
No files found.
test/unit/event.js
View file @
4460d5ad
...
...
@@ -688,6 +688,27 @@ test(".live()/.die()", function() {
jQuery
(
'span#liveSpan1'
).
die
(
'click'
);
});
test
(
"Non DOM element events"
,
function
()
{
expect
(
3
);
jQuery
({})
.
bind
(
'nonelementglobal'
,
function
(
e
)
{
ok
(
true
,
"Global event on non-DOM annonymos object triggered"
);
});
var
o
=
{};
jQuery
(
o
)
.
bind
(
'nonelementobj'
,
function
(
e
)
{
ok
(
true
,
"Event on non-DOM object triggered"
);
}).
bind
(
'nonelementglobal'
,
function
()
{
ok
(
true
,
"Global event on non-DOM object triggered"
);
});
jQuery
(
o
).
trigger
(
'nonelementobj'
);
jQuery
.
event
.
trigger
(
'nonelementglobal'
);
});
/*
test("jQuery(function($) {})", function() {
stop();
...
...
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