* @param {String} HTML representing a single element * @return {Element}
(html)
| 1133 | * @return {Element} |
| 1134 | */ |
| 1135 | function htmlToElement(html) { |
| 1136 | var template = document.createElement('template'); |
| 1137 | html = html.trim(); // Never return a text node of whitespace as the result |
| 1138 | template.innerHTML = html; |
| 1139 | return template.content.firstChild; |
| 1140 | } |
| 1141 | |
| 1142 | function modalDialogCloseOnBackdropClick(dialog) { |
| 1143 | dialog.addEventListener('mousedown', function (event) { |