Add "return" operator to Promise in animateCSS (#1179)

* Add "return" operator to Promise in animateCSS

* Generate docks; add closing tag to "a" in footer
This commit is contained in:
Ed Bond 2020-12-08 16:10:22 +02:00 committed by GitHub
parent fbf2feb242
commit 0b1e0c964e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@ -1114,7 +1114,7 @@ element.style.setProperty('--animate-duration', '0.5s');
<p>You can also use a simple function to add the animations classes and remove them automatically:</p>
<pre><code class="language-javascript">const animateCSS = (element, animation, prefix = 'animate__') =&gt;
// We create a Promise and return it
new Promise((resolve, reject) =&gt; {
return new Promise((resolve, reject) =&gt; {
const animationName = `${prefix}${animation}`;
const node = document.querySelector(element);
@ -1295,7 +1295,7 @@ $ npm install
<footer class="main-footer">
<p>
Animate.css is a MIT licensed library.
You can use it freely, respecting the terms included in the <a href="https://github.com/daneden/animate.css/blob/main/LICENSE" title="license">license file.
You can use it freely, respecting the terms included in the <a href="https://github.com/daneden/animate.css/blob/main/LICENSE" title="license">license file.</a>
</p>
</footer>

View File

@ -30,7 +30,7 @@ You can also use a simple function to add the animations classes and remove them
```javascript
const animateCSS = (element, animation, prefix = 'animate__') =>
// We create a Promise and return it
new Promise((resolve, reject) => {
return new Promise((resolve, reject) => {
const animationName = `${prefix}${animation}`;
const node = document.querySelector(element);

View File

@ -116,7 +116,7 @@
<footer class="main-footer">
<p>
Animate.css is a MIT licensed library.
You can use it freely, respecting the terms included in the <a href="https://github.com/daneden/animate.css/blob/main/LICENSE" title="license">license file.
You can use it freely, respecting the terms included in the <a href="https://github.com/daneden/animate.css/blob/main/LICENSE" title="license">license file.</a>
</p>
</footer>