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
672701ad
Commit
672701ad
authored
Jun 29, 2012
by
Dave Methvin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move jQuery.sub to deprecated.js, because it is.
parent
304eebb2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
21 deletions
+25
-21
core.js
src/core.js
+0
-21
deprecated.js
src/deprecated.js
+21
-0
core.js
test/unit/core.js
+4
-0
No files found.
src/core.js
View file @
672701ad
...
@@ -788,27 +788,6 @@ jQuery.extend({
...
@@ -788,27 +788,6 @@ jQuery.extend({
now
:
function
()
{
now
:
function
()
{
return
(
new
Date
()
).
getTime
();
return
(
new
Date
()
).
getTime
();
},
sub
:
function
()
{
function
jQuerySub
(
selector
,
context
)
{
return
new
jQuerySub
.
fn
.
init
(
selector
,
context
);
}
jQuery
.
extend
(
true
,
jQuerySub
,
this
);
jQuerySub
.
superclass
=
this
;
jQuerySub
.
fn
=
jQuerySub
.
prototype
=
this
();
jQuerySub
.
fn
.
constructor
=
jQuerySub
;
jQuerySub
.
sub
=
this
.
sub
;
jQuerySub
.
fn
.
init
=
function
init
(
selector
,
context
)
{
if
(
context
&&
context
instanceof
jQuery
&&
!
(
context
instanceof
jQuerySub
)
)
{
context
=
jQuerySub
(
context
);
}
return
jQuery
.
fn
.
init
.
call
(
this
,
selector
,
context
,
rootjQuerySub
);
};
jQuerySub
.
fn
.
init
.
prototype
=
jQuerySub
.
fn
;
var
rootjQuerySub
=
jQuerySub
(
document
);
return
jQuerySub
;
}
}
});
});
...
...
src/deprecated.js
View file @
672701ad
...
@@ -38,4 +38,25 @@ if ( browser.webkit ) {
...
@@ -38,4 +38,25 @@ if ( browser.webkit ) {
jQuery
.
browser
=
browser
;
jQuery
.
browser
=
browser
;
jQuery
.
sub
=
function
()
{
function
jQuerySub
(
selector
,
context
)
{
return
new
jQuerySub
.
fn
.
init
(
selector
,
context
);
}
jQuery
.
extend
(
true
,
jQuerySub
,
this
);
jQuerySub
.
superclass
=
this
;
jQuerySub
.
fn
=
jQuerySub
.
prototype
=
this
();
jQuerySub
.
fn
.
constructor
=
jQuerySub
;
jQuerySub
.
sub
=
this
.
sub
;
jQuerySub
.
fn
.
init
=
function
init
(
selector
,
context
)
{
if
(
context
&&
context
instanceof
jQuery
&&
!
(
context
instanceof
jQuerySub
)
)
{
context
=
jQuerySub
(
context
);
}
return
jQuery
.
fn
.
init
.
call
(
this
,
selector
,
context
,
rootjQuerySub
);
};
jQuerySub
.
fn
.
init
.
prototype
=
jQuerySub
.
fn
;
var
rootjQuerySub
=
jQuerySub
(
document
);
return
jQuerySub
;
};
})();
})();
test/unit/core.js
View file @
672701ad
...
@@ -1186,6 +1186,8 @@ test("jQuery.parseXML", 8, function(){
...
@@ -1186,6 +1186,8 @@ test("jQuery.parseXML", 8, function(){
}
}
});
});
if
(
jQuery
.
sub
)
{
test
(
"jQuery.sub() - Static Methods"
,
function
(){
test
(
"jQuery.sub() - Static Methods"
,
function
(){
expect
(
18
);
expect
(
18
);
var
Subclass
=
jQuery
.
sub
();
var
Subclass
=
jQuery
.
sub
();
...
@@ -1307,6 +1309,8 @@ test("jQuery.sub() - .fn Methods", function(){
...
@@ -1307,6 +1309,8 @@ test("jQuery.sub() - .fn Methods", function(){
});
});
}
// jQuery.sub
test
(
"jQuery.camelCase()"
,
function
()
{
test
(
"jQuery.camelCase()"
,
function
()
{
var
tests
=
{
var
tests
=
{
...
...
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