aboutsummaryrefslogtreecommitdiffstats
path: root/src/event.js
diff options
context:
space:
mode:
authorJason Bedard <jason+github@jbedard.ca>2015-08-24 19:56:57 -0700
committerMichał Gołębiowski <m.goleb@gmail.com>2015-09-08 01:00:31 +0200
commit224271982eb9cd351d7db1b38c740b4e927e6f97 (patch)
tree51d05b1ae640aca783e70bc6f415901388ff9c6a /src/event.js
parent02e10082b25df3b47b6b98e3b35399712795b7df (diff)
downloadjquery-224271982eb9cd351d7db1b38c740b4e927e6f97.tar.gz
jquery-224271982eb9cd351d7db1b38c740b4e927e6f97.zip
Data: Don't expose jQuery.acceptData
jQuery.acceptData is an undocumented internal API that shouldn't be exposed. Fixes gh-2555
Diffstat (limited to 'src/event.js')
-rw-r--r--src/event.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/event.js b/src/event.js
index 8a059ca8a..233fd4348 100644
--- a/src/event.js
+++ b/src/event.js
@@ -6,11 +6,11 @@ define( [
"./var/slice",
"./event/support",
"./data/var/dataPriv",
+ "./data/var/acceptData",
"./core/init",
- "./data/accepts",
"./selector"
-], function( jQuery, document, rnotwhite, hasOwn, slice, support, dataPriv ) {
+], function( jQuery, document, rnotwhite, hasOwn, slice, support, dataPriv, acceptData ) {
var
rkeyEvent = /^key/,
@@ -376,7 +376,7 @@ jQuery.event = {
// Native handler
handle = ontype && cur[ ontype ];
- if ( handle && handle.apply && jQuery.acceptData( cur ) ) {
+ if ( handle && handle.apply && acceptData( cur ) ) {
event.result = handle.apply( cur, data );
if ( event.result === false ) {
event.preventDefault();
@@ -389,8 +389,8 @@ jQuery.event = {
if ( !onlyHandlers && !event.isDefaultPrevented() ) {
if ( ( !special._default ||
- special._default.apply( eventPath.pop(), data ) === false ) &&
- jQuery.acceptData( elem ) ) {
+ special._default.apply( eventPath.pop(), data ) === false ) &&
+ acceptData( elem ) ) {
// Call a native DOM method on the target with the same name name as the event.
// Don't do default actions on window, that's where global variables be (#6170)