overAnimation.onfinish = () => {
overAnimation.cancel()
}
const itemRef = document.querySelector('.item')
let move = (e) => {
const x = e.offsetX
itemRef.animate([{
transform: `scale(1.6) rotate(${x}deg)`,
}], {duration: 1000, fill: 'forwards'})
}
itemRef.addEventListener('mouseleave', (e) => {
itemRef.removeEventListener('mousemove', move)
let overAnimation = itemRef.animate([{
transform: 'none',
}], {duration: 1000, fill: 'forwards'})
overAnimation.onfinish = () => {
overAnimation.cancel()
}
})
itemRef.addEventListener('mouseenter', (e) => {
itemRef.addEventListener('mousemove', move)
})
<?php
echo "max_execution_time ".ini_get('max_execution_time')."<br>";
ini_set('max_execution_time', 15);
echo "max_execution_time ".ini_get('max_execution_time')."<br>";
set_time_limit(0);
echo "max_execution_time ".ini_get('max_execution_time')."<br>";
max_execution_time 30
max_execution_time 15
( ! ) Fatal error: Maximum execution time of 15 seconds exceeded in .../www/test.php on line 5
Call Stack
# Time Memory Function Location
1 0.0005 238296 {main}( ) .../test.php:0
2 0.0006 238512 set_time_limit ( ) .../test.php:5
<?php
echo "max_execution_time ".ini_get('max_execution_time')."<br>";
set_time_limit(0);
echo "max_execution_time ".ini_get('max_execution_time')."<br>";
max_execution_time 30
( ! ) Fatal error: Maximum execution time of 30 seconds exceeded in .../www/test.php on line 3
Call Stack
# Time Memory Function Location
1 0.0004 238288 {main}( ) .../test.php:0
2 0.0004 238384 set_time_limit ( ) .../test.php:3
max_execution_time 0
https://codepen.io/popsycode/pen/oNKdrPM