28 строки
830 B
HTML
28 строки
830 B
HTML
|
<!doctype html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta charset="utf-8" />
|
||
|
<title>Local server - ServiceWorker Cookbook</title>
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
|
<style>
|
||
|
body {
|
||
|
font-family: monospace;
|
||
|
font-size: 1rem;
|
||
|
white-space: pre-wrap;
|
||
|
}
|
||
|
</style>
|
||
|
</head>
|
||
|
<body>
|
||
|
Try to add and delete some quotations. The session is not intended to survive refreshing the page
|
||
|
but you could see it pretending to survive. This means the worker holding the state has not been
|
||
|
killed yet.
|
||
|
<form id="add-form">
|
||
|
<input type="text" id="new-quote" placeholder="Add a quote here"/>
|
||
|
<input type="text" id="quote-author" placeholder="And its author"/><input type="submit" value="Add" />
|
||
|
</form>
|
||
|
<table id="quotations">
|
||
|
</table>
|
||
|
<script src="./index.js"></script>
|
||
|
</body>
|
||
|
</html>
|