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:
parent
fbf2feb242
commit
0b1e0c964e
File diff suppressed because one or more lines are too long
|
@ -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__') =>
|
||||
// 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);
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue