会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
雲天望垂墨傾池
博客园
首页
新随笔
联系
订阅
管理
2021年1月8日
MutationObserver
摘要: MutationObserver接口提供了监视对DOM树所做更改的能力。 // 选择需要观察变动的节点 const targetNode = document.getElementById('some-id'); // 观察器的配置(需要观察什么变动) const config = { attrib
阅读全文
posted @ 2021-01-08 17:03 雲天望垂墨傾池
阅读(162)
评论(0)
推荐(0)
2020年10月10日
Canvas视频
摘要: stream = canvas.captureStream();recorder = new MediaRecorder(stream, { mimeType: 'video/webm'});recorder.addEventListener('dataavailable', e => { if (
阅读全文
posted @ 2020-10-10 14:13 雲天望垂墨傾池
阅读(191)
评论(0)
推荐(0)
判断运行环境
摘要: const inBrowser = typeof window !== 'undefined' const inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform const weexPlatform = i
阅读全文
posted @ 2020-10-10 13:41 雲天望垂墨傾池
阅读(135)
评论(0)
推荐(0)
2020年8月12日
滚动条样式
摘要: 对于 Chrome 浏览器: • 整体部分,::-webkit-scrollbar; • 两端按钮,::-webkit-scrollbar-button; • 外层轨道,::-webkit-scrollbar-track; • 内层轨道,::-webkit-scrollbar-track-piece
阅读全文
posted @ 2020-08-12 10:25 雲天望垂墨傾池
阅读(66)
评论(0)
推荐(0)
2020年8月7日
CSS角度
摘要: 一个圆共360度(deg), 400梯度(grad), 2π弧度(rad), 一个圆共1圈(turn) 90deg = 100grad = 0.25turn ≈ 1.570796326794897rad
阅读全文
posted @ 2020-08-07 08:58 雲天望垂墨傾池
阅读(83)
评论(0)
推荐(0)
2020年7月30日
禁止非直接输入
摘要: var lock = false; var inputEle = document.getElementById('inputEle'); // input 事件中的处理逻辑, 这里仅仅打印文本 var todo = function (text) { console.log(text) }; in
阅读全文
posted @ 2020-07-30 10:38 雲天望垂墨傾池
阅读(67)
评论(0)
推荐(0)
2020年7月10日
Vnode
摘要: function isVNode(node) { return node !== null && typeof node 'object' && hasOwn(node, 'componentOptions'); }; if (isVNode(instance.message)) { instanc
阅读全文
posted @ 2020-07-10 09:14 雲天望垂墨傾池
阅读(156)
评论(0)
推荐(0)
2020年7月6日
AddEventListener
摘要: 鼠标事件click 当用户点击某个对象时调用的事件句柄。contextmenu 在用户点击鼠标右键打开上下文菜单时触发dblclick 当用户双击某个对象时调用的事件句柄。mousedown 鼠标按钮被按下。mouseenter 当鼠标指针移动到元素上时触发。mouseleave 当鼠标指针移出元素
阅读全文
posted @ 2020-07-06 16:35 雲天望垂墨傾池
阅读(264)
评论(0)
推荐(0)
2020年6月23日
Curry
摘要: function curry(fn, ...args) { const length = fn.length let lists = args || [] let listLen return function (..._args) { lists = [...lists, ..._args] li
阅读全文
posted @ 2020-06-23 15:33 雲天望垂墨傾池
阅读(195)
评论(0)
推荐(0)
2019年12月17日
性能
摘要: const t = performance.timing 网页重定向耗时:t.redirectEnd - t.redirectStart检查本地缓存的耗时: t.domainLookupStart - t.fetchStartDNS查询的耗时: t.domainLookupEnd - t.domai
阅读全文
posted @ 2019-12-17 15:34 雲天望垂墨傾池
阅读(145)
评论(0)
推荐(0)
下一页
公告