aboutsummaryrefslogtreecommitdiffstats
path: root/src/effects/Tween.js
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2018-02-24 17:17:24 -0500
committerDave Methvin <dave.methvin@gmail.com>2018-03-19 20:33:35 -0400
commit2b5f5d5e90b37f4a735738a6d0b6f22affbea340 (patch)
treec6994421cc716eacba0d687b27a653a70d558558 /src/effects/Tween.js
parentb95e0da68e1e3fce59a6a54c209b893f611b0b9c (diff)
downloadjquery-2b5f5d5e90b37f4a735738a6d0b6f22affbea340.tar.gz
jquery-2b5f5d5e90b37f4a735738a6d0b6f22affbea340.zip
CSS: Avoid filling jQuery.cssProps
Fixes gh-3986 Closes gh-4005 Avoids filling jQuery.cssProps by introducing a second internal prop cache. This allows jQuery Migrate to detect external usage.
Diffstat (limited to 'src/effects/Tween.js')
-rw-r--r--src/effects/Tween.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/effects/Tween.js b/src/effects/Tween.js
index 43eb8fa0b..bf501ead0 100644
--- a/src/effects/Tween.js
+++ b/src/effects/Tween.js
@@ -1,7 +1,9 @@
define( [
"../core",
+ "../css/finalPropName",
+
"../css"
-], function( jQuery ) {
+], function( jQuery, finalPropName ) {
"use strict";
@@ -84,9 +86,9 @@ Tween.propHooks = {
// Use .style if available and use plain properties where available.
if ( jQuery.fx.step[ tween.prop ] ) {
jQuery.fx.step[ tween.prop ]( tween );
- } else if ( tween.elem.nodeType === 1 &&
- ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||
- jQuery.cssHooks[ tween.prop ] ) ) {
+ } else if ( tween.elem.nodeType === 1 && (
+ jQuery.cssHooks[ tween.prop ] ||
+ tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {
jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
} else {
tween.elem[ tween.prop ] = tween.now;