示例工程 22-security-service-worker
22-security-service-worker/05-memory-leak/index.html
点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title>22 · 内存泄漏与 WeakMap</title>
</head>
<body>
<p>打开 Console 查看强引用、WeakMap 与监听器解绑的差异。</p>
<script type="module">
import { run } from './main.js';
run();
</script>
</body>
</html>