WebUI: Replace getElements & getChildren

This PR further reduces Mootools usage.
PR #22220.
This commit is contained in:
skomerko
2025-02-04 10:08:18 +01:00
committed by GitHub
parent 463700b76d
commit 9c2e698514
6 changed files with 53 additions and 65 deletions

View File

@@ -417,13 +417,18 @@
});
});
$("rssDetailsView").getChildren().each(c => c.destroy());
clearDetails();
rssArticleTable.updateTable(false);
};
const clearDetails = () => {
[...document.getElementById("rssDetailsView").children].forEach((el) => { el.destroy(); });
};
const showDetails = (feedUid, articleID) => {
markArticleAsRead(pathByFeedId.get(feedUid), articleID);
$("rssDetailsView").getChildren().each(c => c.destroy());
clearDetails();
const article = feedData[feedUid].filter((article) => article.id === articleID)[0];
if (article) {
$("rssDetailsView").append((() => {