aboutsummaryrefslogtreecommitdiffstats
path: root/src/data
diff options
context:
space:
mode:
Diffstat (limited to 'src/data')
-rw-r--r--src/data/Data.js7
-rw-r--r--src/data/var/acceptData.js (renamed from src/data/accepts.js)8
2 files changed, 5 insertions, 10 deletions
diff --git a/src/data/Data.js b/src/data/Data.js
index 476b3e1e2..a19476ea6 100644
--- a/src/data/Data.js
+++ b/src/data/Data.js
@@ -1,15 +1,14 @@
define( [
"../core",
"../var/rnotwhite",
- "./accepts"
-], function( jQuery, rnotwhite ) {
+ "./var/acceptData"
+], function( jQuery, rnotwhite, acceptData ) {
function Data() {
this.expando = jQuery.expando + Data.uid++;
}
Data.uid = 1;
-Data.accepts = jQuery.acceptData;
Data.prototype = {
@@ -38,7 +37,7 @@ Data.prototype = {
// We can accept data for non-element nodes in modern browsers,
// but we should not, see #8335.
// Always return an empty object.
- if ( !Data.accepts( owner ) ) {
+ if ( !acceptData( owner ) ) {
return {};
}
diff --git a/src/data/accepts.js b/src/data/var/acceptData.js
index 24e2f0ef0..6a1e5021b 100644
--- a/src/data/accepts.js
+++ b/src/data/var/acceptData.js
@@ -1,12 +1,9 @@
-define( [
- "../core"
-], function( jQuery ) {
+define( function() {
/**
* Determines whether an object can have data
*/
-jQuery.acceptData = function( owner ) {
-
+return function( owner ) {
// Accepts only:
// - Node
// - Node.ELEMENT_NODE
@@ -17,5 +14,4 @@ jQuery.acceptData = function( owner ) {
return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
};
-return jQuery.acceptData;
} );