当前仓库属于关闭状态,部分功能使用受限,详情请查阅 仓库状态说明
1 Star 0 Fork 0

oeyoews/pwa-for-localhost
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
index.html 830 Bytes
一键复制 编辑 原始数据 按行查看 历史
oeyoews 提交于 2022-04-26 14:34 +08:00 . 🐬🎣 This is an automatic push
<html>
<head>
<link rel="manifest" href="./manifest.json">
<link rel="shortcut icon" type="image/png" href="icon.png">
<meta charset="UTF-8"/>
<title>PWA Share Target Demo</title>
</head>
<body>
<h1>PWA Share Target Demo</h1>
<script>
if ('serviceWorker' in navigator) {
console.log("serviceWorker available");
navigator.serviceWorker.register('./pwa/sw.js', { scope: './pwa/' }).then(function(reg) {
// registration worked
console.log('Registration succeeded. Scope is ' + reg.scope);
}).catch(function(error) {
// registration failed
console.log('Registration failed with ' + error);
});
}
</script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/oeyoews/pwa-for-localhost.git
git@gitee.com:oeyoews/pwa-for-localhost.git
oeyoews
pwa-for-localhost
pwa-for-localhost
main

搜索帮助