New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

banner-builder

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

banner-builder - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

60

dst/_prop.js

@@ -16,25 +16,8 @@ 'use strict';

this._listenEnd = function () {
_this.deferred = Promise.defer();
_this.el.addEventListener('transitionend', _this._handleEnd);
_this.el.addEventListener('animationend', _this._handleEnd);
};
this.resolve = new Function();
this._handleStart = function (e) {
_this._clearTimeout();
};
this._clearTimeout = function (e) {
clearTimeout(_this.timeout);
};
this._setTimeout = function () {
_this.timeout = setTimeout(function () {
_this.deferred.reject(new Error('Animate callback did not trigger a transtionstart|animationstart event.'));
}, TIMEOUT_DURATION);
};
this._handleEnd = function () {
_this.deferred.resolve(); // TODO check if this.deferred is resolvable.
_this.el.removeEventListener('transitionend', _this._handleEnd);
console.log('end');
_this.resolve();
_this.resolve = new Function();
};

@@ -47,6 +30,6 @@

this.animateSync = function () {
// this._setTimeout();
_this._listenEnd();
_this.animate();
return _this.deferred.promise;
return new Promise(function (resolve) {
_this.resolve = resolve;
requestAnimationFrame(_this.animate);
});
};

@@ -59,29 +42,14 @@

this.resetSync = function () {
// this._setTimeout();
_this._listenEnd();
_this.reset();
return _this.deferred.promise;
return new Promise(function (resolve) {
_this.resolve = resolve;
requestAnimationFrame(_this.reset);
});
};
this.el = el;
this.el.addEventListener('transitionstart', this._handleStart);
this.el.addEventListener('animationstart', this._handleStart);
this.el.addEventListener('transitionend', this._handleEnd);
this.el.addEventListener('animationend', this._handleEnd);
}
/**
*
*/
/*
* Listens for transtion-start events, to make sure 'sync' events are actually being performed on animating objects.
*/
/**
*
*/
/**
* Resolve this object's 'deferred' property.

@@ -88,0 +56,0 @@ *

{
"name": "banner-builder",
"version": "0.0.4",
"version": "0.0.5",
"description": "",

@@ -5,0 +5,0 @@ "main": "dst/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc