nexus site path corrected
[portal.git] / ecomp-portal-FE / client / bower_components / jquery / src / css / addGetHookIf.js
1 define( function() {
2
3 function addGetHookIf( conditionFn, hookFn ) {
4
5         // Define the hook, we'll check on the first run if it's really needed.
6         return {
7                 get: function() {
8                         if ( conditionFn() ) {
9
10                                 // Hook not needed (or it's not possible to use it due
11                                 // to missing dependency), remove it.
12                                 delete this.get;
13                                 return;
14                         }
15
16                         // Hook needed; redefine it so that the support test is not executed again.
17                         return ( this.get = hookFn ).apply( this, arguments );
18                 }
19         };
20 }
21
22 return addGetHookIf;
23
24 } );