I saw a lot of events trigger('contentUpdated'). For example: vendor/magento/module-catalog/view/frontend/web/js/catalog-add-to-cart.js. My question is:

  • Where is the function contentUpdated?
  • Can anyone give me a brief description about it?

1 Answer 1


contentUpdated is not a function, it is an event (similar to the load or click events).

This event is listened in lib/web/mage/mage.js :

$('body').on('contentUpdated', function () {
    if (mage) {

It basically reinit the components inside a dynamic group of update elements.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.