Test queueMicrotask

This commit is contained in:
Lim Chee Aun 2023-12-27 23:32:52 +08:00
parent 53b1755e51
commit cfe41cb802
2 changed files with 3 additions and 2 deletions

View file

@ -244,7 +244,8 @@ function _enhanceContent(content, opts = {}) {
}
if (postEnhanceDOM) {
postEnhanceDOM(dom); // mutate dom
queueMicrotask(() => postEnhanceDOM(dom));
// postEnhanceDOM(dom); // mutate dom
}
enhancedContent = dom.innerHTML;

View file

@ -180,7 +180,7 @@ export function saveStatus(status, instance, opts) {
// THREAD TRAVERSER
if (!skipThreading) {
requestAnimationFrame(() => {
queueMicrotask(() => {
threadifyStatus(status, instance);
if (status.reblog) {
threadifyStatus(status.reblog, instance);