diff --git a/scriptengines/javascript/simplejavascriptapplet.cpp b/scriptengines/javascript/simplejavascriptapplet.cpp index a5ab5bea2..02bf616ce 100644 --- a/scriptengines/javascript/simplejavascriptapplet.cpp +++ b/scriptengines/javascript/simplejavascriptapplet.cpp @@ -427,7 +427,8 @@ QScriptValue SimpleJavaScriptApplet::animation(QScriptContext *context, QScriptE populateAnimationsHash(); QString animName = context->argument(0).toString().toLower(); const bool isPause = animName == "pause"; - if (!isPause && !s_animationDefs.contains(animName)) { + const bool isProperty = animName == "property"; + if (!isPause && !isProperty && !s_animationDefs.contains(animName)) { return context->throwError(i18n("%1 is not a known animation type", animName)); } @@ -436,6 +437,9 @@ QScriptValue SimpleJavaScriptApplet::animation(QScriptContext *context, QScriptE if (isPause) { QPauseAnimation *pause = new QPauseAnimation(parent); return engine->newQObject(pause); + } else if (isProperty) { + QPropertyAnimation *propertyAnim = new QPropertyAnimation(parent); + return engine->newQObject(propertyAnim); } else { Plasma::Animation *anim = Plasma::Animator::create(s_animationDefs.value(animName), parent); if (anim) {