MCPcopy Create free account
hub / github.com/bigskysoftware/_hyperscript / _settleOne

Function _settleOne

tools/common/_hyperscript.iife.js:8360–8380  ·  view source on GitHub ↗
(elt)

Source from the content-addressed store, hash-verified

8358 }
8359 };
8360 function _settleOne(elt) {
8361 return new Promise(function(resolve) {
8362 var resolved = false;
8363 var transitionStarted = false;
8364 elt.addEventListener("transitionstart", function() {
8365 transitionStarted = true;
8366 }, { once: true });
8367 setTimeout(function() {
8368 if (!transitionStarted && !resolved) {
8369 resolved = true;
8370 resolve();
8371 }
8372 }, 500);
8373 elt.addEventListener("transitionend", function() {
8374 if (!resolved) {
8375 resolved = true;
8376 resolve();
8377 }
8378 }, { once: true });
8379 });
8380 }
8381 var TransitionCommand = class _TransitionCommand extends Command {
8382 static keyword = "transition";
8383 constructor(propExprs, from, to, usingExpr, over) {

Callers

nothing calls this directly

Calls 1

setTimeoutFunction · 0.70

Tested by

no test coverage detected