Comparing version 0.1.6 to 0.1.7
@@ -856,3 +856,5 @@ /******/ (function(modules) { // webpackBootstrap | ||
function showToastWindow(msg, callback) { | ||
console.log('showToastWindow') | ||
var handleTransitionEnd = function () { | ||
console.log('showToastWindow -> handleTransitionEnd') | ||
toastWin.removeEventListener('transitionend', handleTransitionEnd) | ||
@@ -867,3 +869,3 @@ toastWin.removeEventListener('webkitTransitionEnd', handleTransitionEnd) | ||
} | ||
toastWin.innerHTML = msg | ||
toastWin.textContent = msg | ||
toastWin.addEventListener('transitionend', handleTransitionEnd) | ||
@@ -874,9 +876,8 @@ toastWin.addEventListener('webkitTransitionEnd', handleTransitionEnd) | ||
}, 0) | ||
setTimeout(function () { | ||
callback && callback() | ||
}, TRANSITION_TIME * 1000) | ||
} | ||
function hideToastWindow(callback) { | ||
console.log('hideToastWindow') | ||
var handleTransitionEnd = function () { | ||
console.log('hideToastWindow -> handleTransitionEnd') | ||
toastWin.removeEventListener('transitionend', handleTransitionEnd) | ||
@@ -891,6 +892,5 @@ toastWin.removeEventListener('webkitTransitionEnd', handleTransitionEnd) | ||
toastWin.addEventListener('webkitTransitionEnd', handleTransitionEnd) | ||
toastWin.classList.add('hide') | ||
setTimeout(function () { | ||
callback && callback() | ||
}, TRANSITION_TIME * 1000) | ||
toastWin.classList.add('hide') | ||
}, 0) | ||
} | ||
@@ -935,3 +935,2 @@ | ||
} | ||
} | ||
@@ -938,0 +937,0 @@ |
{ | ||
"name": "modals", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "reimplementation of toast/alert/confirm/prompt", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -15,3 +15,5 @@ 'use strict' | ||
function showToastWindow(msg, callback) { | ||
console.log('showToastWindow') | ||
var handleTransitionEnd = function () { | ||
console.log('showToastWindow -> handleTransitionEnd') | ||
toastWin.removeEventListener('transitionend', handleTransitionEnd) | ||
@@ -26,3 +28,3 @@ toastWin.removeEventListener('webkitTransitionEnd', handleTransitionEnd) | ||
} | ||
toastWin.innerHTML = msg | ||
toastWin.textContent = msg | ||
toastWin.addEventListener('transitionend', handleTransitionEnd) | ||
@@ -33,9 +35,8 @@ toastWin.addEventListener('webkitTransitionEnd', handleTransitionEnd) | ||
}, 0) | ||
setTimeout(function () { | ||
callback && callback() | ||
}, TRANSITION_TIME * 1000) | ||
} | ||
function hideToastWindow(callback) { | ||
console.log('hideToastWindow') | ||
var handleTransitionEnd = function () { | ||
console.log('hideToastWindow -> handleTransitionEnd') | ||
toastWin.removeEventListener('transitionend', handleTransitionEnd) | ||
@@ -50,6 +51,5 @@ toastWin.removeEventListener('webkitTransitionEnd', handleTransitionEnd) | ||
toastWin.addEventListener('webkitTransitionEnd', handleTransitionEnd) | ||
toastWin.classList.add('hide') | ||
setTimeout(function () { | ||
callback && callback() | ||
}, TRANSITION_TIME * 1000) | ||
toastWin.classList.add('hide') | ||
}, 0) | ||
} | ||
@@ -94,3 +94,2 @@ | ||
} | ||
} | ||
@@ -97,0 +96,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
90315