随笔分类 -  web 设备API

网络应用程序有用的方式操作和检索现代设备硬件中的数据的API
摘要:btn.addEventListener("click", async () => { try { const state = await Notification.requestPermission(); if (state !== "granted") { // Need to request 阅读全文
posted @ 2020-10-11 11:07 Ajanuw 阅读(606) 评论(0) 推荐(0) 编辑
摘要:let lock; btn.addEventListener("click", async () => { try { if (lock) { lock.release(); return; } lock = await navigator.wakeLock.request("screen"); l 阅读全文
posted @ 2020-10-11 10:39 Ajanuw 阅读(564) 评论(0) 推荐(0) 编辑
摘要:选择文件,获取文件句柄 btn.addEventListener("click", async (e) => { try { const hFiles = await window.showOpenFilePicker({ types: [ { description: "文本文件", accept 阅读全文
posted @ 2020-10-09 20:14 Ajanuw 阅读(1978) 评论(0) 推荐(1) 编辑
摘要:google 文档 "https://developers.google.cn/web/fundamentals/instant and offline/offline cookbook/" 网页存储概览 "https://developers.google.cn/web/fundamentals/ 阅读全文
posted @ 2018-02-06 15:59 Ajanuw 编辑
摘要:获取本地的音频 <input type="file" accept="audio/*" capture="microphone" id="recorder"> <audio id="player" controls></audio> <script> var recorder = document. 阅读全文
posted @ 2018-02-06 14:50 Ajanuw 阅读(5036) 评论(0) 推荐(1) 编辑
摘要:google 文档 "https://developers.google.cn/web/updates/2017/02/media session" 阅读全文
posted @ 2018-02-06 14:20 Ajanuw 阅读(791) 评论(0) 推荐(0) 编辑
摘要:<!--[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 阅读全文
posted @ 2018-02-05 11:46 Ajanuw 阅读(354) 评论(0) 推荐(0) 编辑
摘要:```html let a = 0; if ('orientation' in screen) { document.getElementById('doc').textContent = ; document.getElementById('model').textContent = ; scre 阅读全文
posted @ 2018-02-03 14:09 Ajanuw 阅读(527) 评论(0) 推荐(0) 编辑
摘要:google网络推送通知 "https://developers.google.cn/web/fundamentals/push notifications/" 服务工作线程:简介 "https://developers.google.cn/web/fundamentals/primers/serv 阅读全文
posted @ 2018-02-02 20:05 Ajanuw 阅读(414) 评论(0) 推荐(0) 编辑
摘要:Pointer events 指针事件 TouchEvent MouseEvent 鼠标事件 See alse: https://developers.google.cn/web/fundamentals/design-and-ux/input/touch/ 阅读全文
posted @ 2018-02-02 13:58 Ajanuw 阅读(536) 评论(0) 推荐(0) 编辑
摘要:api 有相应更新 "https://www.chromestatus.com/features/4781762488041472" html <!DOCTYPE html ajanuw <! [if lt IE 8] <h3 请升级你的浏览器,或更换主浏览器!!!</h3 <![endif] 账号 阅读全文
posted @ 2018-02-02 13:08 Ajanuw 阅读(262) 评论(0) 推荐(0) 编辑
摘要:设备屏幕方向与运动 "https://developers.google.cn/web/fundamentals/native hardware/device orientation/" MDN deviceorientation文档 "https://developer.mozilla.org/z 阅读全文
posted @ 2018-01-31 13:53 Ajanuw 阅读(472) 评论(0) 推荐(0) 编辑
摘要:网络应用清单 "https://developers.google.cn/web/fundamentals/web app manifest/" MDN 文档 "https://developer.mozilla.org/zh CN/docs/Web/Manifest" MDN manifest.j 阅读全文
posted @ 2018-01-31 11:33 Ajanuw 阅读(176) 评论(0) 推荐(0) 编辑
摘要:"MDN 文档" 此方法需要用户手势。 否则,它返回false。 javascript const koa2 = require( ); const Router = require( ); const router = new Router(); const app = new koa2(); c 阅读全文
posted @ 2018-01-26 11:14 Ajanuw 阅读(811) 评论(0) 推荐(0) 编辑
摘要:"MDN地址" google 文档 "https://developers.google.cn/web/fundamentals/push notifications/" javascript const koa2 = require( ); const Router = require( ); c 阅读全文
posted @ 2018-01-13 13:15 Ajanuw 阅读(232) 评论(0) 推荐(0) 编辑
摘要:W3C 文档 "https://www.w3.org/TR/page visibility/" MDN 文档 "https://www.w3.org/TR/page visibility/" 阅读全文
posted @ 2017-12-07 12:03 Ajanuw 阅读(264) 评论(0) 推荐(0) 编辑