随笔分类 - web 设备API
网络应用程序有用的方式操作和检索现代设备硬件中的数据的API
摘要:btn.addEventListener("click", async () => { try { const state = await Notification.requestPermission(); if (state !== "granted") { // Need to request
阅读全文
摘要:let lock; btn.addEventListener("click", async () => { try { if (lock) { lock.release(); return; } lock = await navigator.wakeLock.request("screen"); l
阅读全文
摘要:选择文件,获取文件句柄 btn.addEventListener("click", async (e) => { try { const hFiles = await window.showOpenFilePicker({ types: [ { description: "文本文件", accept
阅读全文
摘要:google 文档 "https://developers.google.cn/web/fundamentals/instant and offline/offline cookbook/" 网页存储概览 "https://developers.google.cn/web/fundamentals/
阅读全文
摘要:获取本地的音频 <input type="file" accept="audio/*" capture="microphone" id="recorder"> <audio id="player" controls></audio> <script> var recorder = document.
阅读全文
摘要:google 文档 "https://developers.google.cn/web/updates/2017/02/media session"
阅读全文
摘要:<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7"><![endif]--> <!--[if IE 7]><html class="no-js lt-ie9 lt-ie8"><![endif]--> <!--[if IE 8]><htm
阅读全文
摘要:```html let a = 0; if ('orientation' in screen) { document.getElementById('doc').textContent = ; document.getElementById('model').textContent = ; scre
阅读全文
摘要:google网络推送通知 "https://developers.google.cn/web/fundamentals/push notifications/" 服务工作线程:简介 "https://developers.google.cn/web/fundamentals/primers/serv
阅读全文
摘要:Pointer events 指针事件 TouchEvent MouseEvent 鼠标事件 See alse: https://developers.google.cn/web/fundamentals/design-and-ux/input/touch/
阅读全文
摘要:api 有相应更新 "https://www.chromestatus.com/features/4781762488041472" html <!DOCTYPE html ajanuw <! [if lt IE 8] <h3 请升级你的浏览器,或更换主浏览器!!!</h3 <![endif] 账号
阅读全文
摘要:设备屏幕方向与运动 "https://developers.google.cn/web/fundamentals/native hardware/device orientation/" MDN deviceorientation文档 "https://developer.mozilla.org/z
阅读全文
摘要:网络应用清单 "https://developers.google.cn/web/fundamentals/web app manifest/" MDN 文档 "https://developer.mozilla.org/zh CN/docs/Web/Manifest" MDN manifest.j
阅读全文
摘要:"MDN 文档" 此方法需要用户手势。 否则,它返回false。 javascript const koa2 = require( ); const Router = require( ); const router = new Router(); const app = new koa2(); c
阅读全文
摘要:"MDN地址" google 文档 "https://developers.google.cn/web/fundamentals/push notifications/" javascript const koa2 = require( ); const Router = require( ); c
阅读全文
摘要:W3C 文档 "https://www.w3.org/TR/page visibility/" MDN 文档 "https://www.w3.org/TR/page visibility/"
阅读全文