-
Notifications
You must be signed in to change notification settings - Fork 1
/
timeout-animations.html
33 lines (30 loc) · 1.04 KB
/
timeout-animations.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Animation implemented with timeouts</title>
<link rel="stylesheet" href="css/demo.css">
<link rel="stylesheet" href="css/common.css">
<link rel="import" href="components/event-loop.html">
<link rel="import" href="components/browser.html">
<link rel="import" href="components/queues.html">
<link rel="import" href="components/rendering-pipeline.html">
<link rel="import" href="components/queue-selector.html">
<link rel="import" href="components/queue.html">
<link rel="import" href="components/task-source.html">
</head>
<body>
<event-loop style="width: 100%">
<task-queues>
<task-queue></task-queue>
</task-queues>
</event-loop>
<script>
document.body.addEventListener('click', () => {
const eventLoop = document.querySelector('event-loop');
eventLoop.addTask('repeating');
});
</script>
</body>
</html>