messageBox: keep children specified via appendChild in buttons

This commit is contained in:
tophf 2018-04-12 21:02:02 +03:00
parent 5b9fd4454b
commit ff9e37ec5f

View File

@ -113,9 +113,10 @@ function messageBox({
buttons.map((content, buttonIndex) => content &&
$create('button', Object.assign({
buttonIndex,
textContent: typeof content === 'object' ? '' : content,
onclick: messageBox.listeners.button,
}, typeof content === 'object' && content)))),
}, typeof content === 'object' ? content : {
textContent: content,
})))),
]),
]);
}