This commit is contained in:
Sj-Si 2024-04-15 09:31:30 -04:00
parent b7a6df9460
commit 451190c7fc
3 changed files with 11 additions and 2 deletions

View file

@ -411,6 +411,11 @@ function htmlStringToElement(s) {
return tmp.body.firstElementChild;
}
function htmlStringToFragment(s) {
/** Converts an HTML string into a DocumentFragment. */
return document.createRange().createContextualFragment(s);
}
function toggleCss(key, css, enable) {
var style = document.getElementById(key);
if (enable && !style) {