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
cef34502
Commit
cef34502
authored
Jan 03, 2013
by
Dave Methvin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove noCloneEvent detects and white-box unit test.
parent
4ee1b03c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
54 deletions
+0
-54
support.js
src/support.js
+0
-12
manipulation.js
test/unit/manipulation.js
+0
-42
No files found.
src/support.js
View file @
cef34502
...
@@ -36,7 +36,6 @@ jQuery.support = (function() {
...
@@ -36,7 +36,6 @@ jQuery.support = (function() {
boxModel
:
document
.
compatMode
===
"CSS1Compat"
,
boxModel
:
document
.
compatMode
===
"CSS1Compat"
,
// Will be defined later
// Will be defined later
noCloneEvent
:
true
,
reliableMarginRight
:
true
,
reliableMarginRight
:
true
,
boxSizingReliable
:
true
,
boxSizingReliable
:
true
,
pixelPosition
:
false
pixelPosition
:
false
...
@@ -71,17 +70,6 @@ jQuery.support = (function() {
...
@@ -71,17 +70,6 @@ jQuery.support = (function() {
// WebKit doesn't clone checked state correctly in fragments
// WebKit doesn't clone checked state correctly in fragments
support
.
checkClone
=
fragment
.
cloneNode
(
true
).
cloneNode
(
true
).
lastChild
.
checked
;
support
.
checkClone
=
fragment
.
cloneNode
(
true
).
cloneNode
(
true
).
lastChild
.
checked
;
// Support: IE<9
// Opera does not clone events (and typeof div.attachEvent === undefined).
// IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
if
(
div
.
attachEvent
)
{
div
.
attachEvent
(
"onclick"
,
function
()
{
support
.
noCloneEvent
=
false
;
});
div
.
cloneNode
(
true
).
click
();
}
// Support: Firefox 17+
// Support: Firefox 17+
// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php
// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php
div
.
setAttribute
(
"onfocusin"
,
"t"
);
div
.
setAttribute
(
"onfocusin"
,
"t"
);
...
...
test/unit/manipulation.js
View file @
cef34502
...
@@ -626,48 +626,6 @@ test( "replaceWith([]) where replacing element requires cloning", function () {
...
@@ -626,48 +626,6 @@ test( "replaceWith([]) where replacing element requires cloning", function () {
"Make sure replacing elements were cloned"
);
"Make sure replacing elements were cloned"
);
});
});
test
(
"append the same fragment with events (Bug #6997, 5566)"
,
function
()
{
var
element
,
clone
,
doExtra
=
!
jQuery
.
support
.
noCloneEvent
&&
document
[
"fireEvent"
];
expect
(
2
+
(
doExtra
?
1
:
0
)
);
stop
();
// This patch modified the way that cloning occurs in IE; we need to make sure that
// native event handlers on the original object don't get disturbed when they are
// modified on the clone
if
(
doExtra
)
{
element
=
jQuery
(
"div:first"
).
click
(
function
()
{
ok
(
true
,
"Event exists on original after being unbound on clone"
);
jQuery
(
this
).
unbind
(
"click"
);
});
clone
=
element
.
clone
(
true
).
unbind
(
"click"
);
clone
[
0
].
fireEvent
(
"onclick"
);
element
[
0
].
fireEvent
(
"onclick"
);
// manually clean up detached elements
clone
.
remove
();
}
element
=
jQuery
(
"<a class='test6997'></a>"
).
click
(
function
()
{
ok
(
true
,
"Append second element events work"
);
});
jQuery
(
"#listWithTabIndex li"
).
append
(
element
)
.
find
(
"a.test6997"
).
eq
(
1
).
click
();
element
=
jQuery
(
"<li class='test6997'></li>"
).
click
(
function
()
{
ok
(
true
,
"Before second element events work"
);
start
();
});
jQuery
(
"#listWithTabIndex li"
).
before
(
element
);
jQuery
(
"#listWithTabIndex li.test6997"
).
eq
(
1
).
click
();
});
test
(
"append HTML5 sectioning elements (Bug #6485)"
,
function
()
{
test
(
"append HTML5 sectioning elements (Bug #6485)"
,
function
()
{
expect
(
2
);
expect
(
2
);
...
...
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