| 1 |
/** |
| 2 |
* Wishlist Button widget behavior. |
| 3 |
* |
| 4 |
* The actual interactions are handled by the Wishlist module's global script. |
| 5 |
* We keep an Elementor hook to ensure correct initialization in the editor. |
| 6 |
*/ |
| 7 |
(function ($) { |
| 8 |
"use strict"; |
| 9 |
|
| 10 |
/** |
| 11 |
* Initialize widget instance. |
| 12 |
* |
| 13 |
* @param {Object} $scope Elementor scope. |
| 14 |
* @returns {void} |
| 15 |
*/ |
| 16 |
const initWishlistButton = ($scope) => { |
| 17 |
// Intentionally empty: behavior is handled globally. |
| 18 |
void $scope; |
| 19 |
}; |
| 20 |
|
| 21 |
$(window).on("elementor/frontend/init", function () { |
| 22 |
elementorFrontend.hooks.addAction( |
| 23 |
"frontend/element_ready/king-addons-wishlist-button.default", |
| 24 |
function ($scope) { |
| 25 |
initWishlistButton($scope); |
| 26 |
} |
| 27 |
); |
| 28 |
}); |
| 29 |
})(jQuery); |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|