X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=POLICY-SDK-APP%2Fsrc%2Fmain%2Fwebapp%2Fapp%2FpolicyApp%2Flibs%2Fbower_components%2Fjquery%2Fsrc%2Fcss%2FaddGetHookIf.js;fp=POLICY-SDK-APP%2Fsrc%2Fmain%2Fwebapp%2Fapp%2FpolicyApp%2Flibs%2Fbower_components%2Fjquery%2Fsrc%2Fcss%2FaddGetHookIf.js;h=e12f3598d366e7d2f5d95f553adb0db329f9eac4;hb=e0addf5b588a1244f9679becd90999dfcb4c3a94;hp=0000000000000000000000000000000000000000;hpb=39fb0f30472777e4b60d6a7ac8aa4eb9773961ff;p=policy%2Fengine.git diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/libs/bower_components/jquery/src/css/addGetHookIf.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/libs/bower_components/jquery/src/css/addGetHookIf.js new file mode 100644 index 000000000..e12f3598d --- /dev/null +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/libs/bower_components/jquery/src/css/addGetHookIf.js @@ -0,0 +1,22 @@ +define(function() { + +function addGetHookIf( conditionFn, hookFn ) { + // Define the hook, we'll check on the first run if it's really needed. + return { + get: function() { + if ( conditionFn() ) { + // Hook not needed (or it's not possible to use it due + // to missing dependency), remove it. + delete this.get; + return; + } + + // Hook needed; redefine it so that the support test is not executed again. + return (this.get = hookFn).apply( this, arguments ); + } + }; +} + +return addGetHookIf; + +});