| Current Path : /var/www/clients/client3/web2/web/pub/static/frontend/Magento/luma/en_US/mage/view/ |
| Current File : /var/www/clients/client3/web2/web/pub/static/frontend/Magento/luma/en_US/mage/view/composite.js |
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/**
* @deprecated since version 2.2.0
*/
/* eslint-disable strict */
define(['jquery'], function ($) {
return function () {
var renderedChildren = {},
children = {};
return {
/**
* @param {*} child
* @param {String} key
*/
addChild: function (child, key) {
children[key] = child;
},
/**
* @param {*} root
*/
render: function (root) {
$.each(children, function (key, child) {
var childRoot = $('<div>');
renderedChildren[key] = child.render(childRoot);
root.append(childRoot);
});
}
};
};
});