1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2025-07-03 05:02:15 +02:00

🐛 fixes #41

This commit is contained in:
2025-03-17 15:10:04 +01:00
parent 04f93345f8
commit 7e3b54153d
11 changed files with 42 additions and 42 deletions

View File

@ -1,5 +1,5 @@
import { enviroment as env, evc, evd } from './common.js';
import { isInstance } from "../helpers.js";
import { isInstance, requestIdle } from "../helpers.js";
/**
* Connection changes observer for tracking element connection/disconnection
@ -149,15 +149,6 @@ function connectionsChangesObserverConstructor(){
observer.disconnect();
}
//TODO: remount support?
/**
* Schedule a task during browser idle time
* @returns {Promise<void>} Promise that resolves when browser is idle
*/
function requestIdle(){ return new Promise(function(resolve){
(requestIdleCallback || requestAnimationFrame)(resolve);
}); }
/**
* Collects child elements from the store that are contained by the given element
* @param {Element} element - Parent element