hyperscript.org
Advanced tools
Comparing version 0.8.4-beta.3 to 0.9.0
@@ -746,3 +746,3 @@ ///========================================================================= | ||
var fromVal = from[i]; | ||
if (fromVal == "computed" || fromVal == null) { | ||
if (fromVal === "computed" || fromVal == null) { | ||
target.style[property] = initialStyles[property]; | ||
@@ -753,4 +753,39 @@ } else { | ||
} | ||
// console.log("transition started", transition); | ||
//console.log("transition started", transition); | ||
var transitionStarted = false; | ||
var resolved = false; | ||
target.addEventListener( | ||
"transitionend", | ||
function () { | ||
if (!resolved) { | ||
//console.log("transition ended", transition); | ||
target.style.transition = initialTransition; | ||
resolved = true; | ||
resolve(); | ||
} | ||
}, | ||
{ once: true } | ||
); | ||
target.addEventListener( | ||
"transitionstart", | ||
function () { | ||
transitionStarted = true; | ||
}, | ||
{ once: true } | ||
); | ||
// it no transition has started in 100ms, continue | ||
setTimeout(function () { | ||
if (!resolved && !transitionStarted) { | ||
//console.log("transition ended", transition); | ||
target.style.transition = initialTransition; | ||
resolved = true; | ||
resolve(); | ||
} | ||
}, 100); | ||
setTimeout(function () { | ||
var autoProps = []; | ||
@@ -760,3 +795,3 @@ for (var i = 0; i < properties.length; i++) { | ||
var toVal = to[i]; | ||
if (toVal == "initial") { | ||
if (toVal === "initial") { | ||
var propertyValue = internalData.initalStyles[property]; | ||
@@ -767,14 +802,5 @@ target.style[property] = propertyValue; | ||
} | ||
// console.log("set", property, "to", target.style[property], "on", target, "value passed in : ", toVal); | ||
//console.log("set", property, "to", target.style[property], "on", target, "value passed in : ", toVal); | ||
} | ||
target.addEventListener( | ||
"transitionend", | ||
function () { | ||
// console.log("transition ended", transition); | ||
target.style.transition = initialTransition; | ||
resolve(); | ||
}, | ||
{ once: true } | ||
); | ||
}, 5); | ||
}, 0); | ||
}); | ||
@@ -781,0 +807,0 @@ promises.push(promise); |
@@ -8,3 +8,3 @@ { | ||
], | ||
"version": "0.8.4-beta.3", | ||
"version": "0.9.0", | ||
"homepage": "https://hyperscript.org/", | ||
@@ -22,26 +22,26 @@ "bugs": { | ||
"exports": { | ||
".": { | ||
"import": "./dist/_hyperscript_web.modern.js", | ||
"umd": "./dist/_hyperscript_web.min.js" | ||
}, | ||
"./worker": { | ||
"import": "./dist/worker.modern.js", | ||
"umd": "./dist/worker.min.js" | ||
}, | ||
"./socket": { | ||
"import": "./dist/socket.modern.js", | ||
"umd": "./dist/socket.min.js" | ||
}, | ||
"./eventsource": { | ||
"import": "./dist/eventsource.modern.js", | ||
"umd": "./dist/eventsource.min.js" | ||
}, | ||
"./hdb": { | ||
"import": "./dist/hdb.modern.js", | ||
"umd": "./dist/eventsource.min.js" | ||
}, | ||
"./template": { | ||
"import": "./dist/hdb.modern.js", | ||
"umd": "./dist/eventsource.min.js" | ||
} | ||
".": { | ||
"import": "./dist/_hyperscript_web.modern.js", | ||
"umd": "./dist/_hyperscript_web.min.js" | ||
}, | ||
"./worker": { | ||
"import": "./dist/worker.modern.js", | ||
"umd": "./dist/worker.min.js" | ||
}, | ||
"./socket": { | ||
"import": "./dist/socket.modern.js", | ||
"umd": "./dist/socket.min.js" | ||
}, | ||
"./eventsource": { | ||
"import": "./dist/eventsource.modern.js", | ||
"umd": "./dist/eventsource.min.js" | ||
}, | ||
"./hdb": { | ||
"import": "./dist/hdb.modern.js", | ||
"umd": "./dist/eventsource.min.js" | ||
}, | ||
"./template": { | ||
"import": "./dist/hdb.modern.js", | ||
"umd": "./dist/eventsource.min.js" | ||
} | ||
}, | ||
@@ -48,0 +48,0 @@ "module": "./dist/_hyperscript_web.esm.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
2040642
8949
13