mirror of
https://github.com/jquery/jquery.git
synced 2026-01-23 12:58:20 -05:00
Conflicts: Gruntfile.js README.md src/ajax.js src/ajax/xhr.js src/attributes.js src/core.js src/css.js src/data.js src/effects.js src/event.js src/manipulation.js src/offset.js src/selector-native.js src/traversing.js test/unit/core.js test/unit/data.js
22 lines
573 B
JavaScript
22 lines
573 B
JavaScript
define([
|
|
"../core"
|
|
], function( jQuery ) {
|
|
|
|
/**
|
|
* Determines whether an object can have data
|
|
*/
|
|
jQuery.acceptData = function( elem ) {
|
|
// Do not set data on non-element because it will not be cleared (#8335).
|
|
if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) {
|
|
return false;
|
|
}
|
|
|
|
var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
|
|
|
|
// nodes accept data unless otherwise specified; rejection can be conditional
|
|
return !noData || noData !== true && elem.getAttribute("classid") === noData;
|
|
};
|
|
|
|
return jQuery.acceptData;
|
|
});
|