aboutsummaryrefslogtreecommitdiffstats
path: root/bower_components/jquery/src/data/accepts.js
diff options
context:
space:
mode:
Diffstat (limited to 'bower_components/jquery/src/data/accepts.js')
-rw-r--r--bower_components/jquery/src/data/accepts.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/bower_components/jquery/src/data/accepts.js b/bower_components/jquery/src/data/accepts.js
new file mode 100644
index 0000000..6e0b1b5
--- /dev/null
+++ b/bower_components/jquery/src/data/accepts.js
@@ -0,0 +1,21 @@
+define([
+ "../core"
+], function( jQuery ) {
+
+/**
+ * Determines whether an object can have data
+ */
+jQuery.acceptData = function( elem ) {
+ var noData = jQuery.noData[ (elem.nodeName + " ").toLowerCase() ],
+ nodeType = +elem.nodeType || 1;
+
+ // Do not set data on non-element DOM nodes because it will not be cleared (#8335).
+ return nodeType !== 1 && nodeType !== 9 ?
+ false :
+
+ // Nodes accept data unless otherwise specified; rejection can be conditional
+ !noData || noData !== true && elem.getAttribute("classid") === noData;
+};
+
+return jQuery.acceptData;
+});