1

I want to create a mixin for js/modal/confirm.js but that widget returns some javascript to make it possible to create an instance of the widget instead of the widget itself.

So it returns this

// vendor/magento/module-ui/view/base/web/js/modal/confirm.js
...
    return function (config) {
        return $('<div></div>').html(config.content).confirm(config);
    };
});

instead of

// vendor/magento/module-ui/view/base/web/js/modal/confirm.js
...
    return $.mage.confirm;
});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.