惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 【当耐特】
WordPress大学
WordPress大学
T
The Exploit Database - CXSecurity.com
博客园_首页
MyScale Blog
MyScale Blog
The Cloudflare Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
美团技术团队
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
M
MIT News - Artificial intelligence
Microsoft Security Blog
Microsoft Security Blog
F
Full Disclosure
V
V2EX
博客园 - Franky
博客园 - 三生石上(FineUI控件)
Hugging Face - Blog
Hugging Face - Blog
P
Proofpoint News Feed
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
SecWiki News
SecWiki News
N
Netflix TechBlog - Medium
S
Secure Thoughts
酷 壳 – CoolShell
酷 壳 – CoolShell
Hacker News: Ask HN
Hacker News: Ask HN
爱范儿
爱范儿
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Webroot Blog
Webroot Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Martin Fowler
Martin Fowler
PCI Perspectives
PCI Perspectives
S
Security @ Cisco Blogs
Recorded Future
Recorded Future
Help Net Security
Help Net Security
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
AI
AI
Microsoft Azure Blog
Microsoft Azure Blog
K
Kaspersky official blog
G
GRAHAM CLULEY
H
Hackread – Cybersecurity News, Data Breaches, AI and More
C
CERT Recently Published Vulnerability Notes
U
Unit 42
T
Tor Project blog
Cloudbric
Cloudbric
Hacker News - Newest:
Hacker News - Newest: "LLM"
MongoDB | Blog
MongoDB | Blog
GbyAI
GbyAI
T
The Blog of Author Tim Ferriss
Security Latest
Security Latest
N
News and Events Feed by Topic
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO

Blog on Reorx’s Forge

My OpenClaw Desperately Needs a DevOps Agent OpenClaw Is Changing My Life Rabbit R1 - The Upgraded Replacement for Smart Phones Debounce and Throttle | Reorx’s Forge 浅谈 Chrome Manifest V3 的优缺点 使用 Railway 和 Supabase 零成本搭建 n8n 自动化平台 分体式键盘 | Reorx’s Forge 2022 年 9 月苹果发布会观后感 | Reorx’s Forge 2022 年 7 月和 8 月总结 种草无线便携路由器 | Reorx’s Forge 更换博客评论系统 | Reorx’s Forge 使用自动化工作流聚合信息摄入和输出 | Reorx’s Forge 我关注的独立开发者们 | Reorx’s Forge 我理想中的 Newsletter platform | Reorx’s Forge 搭建 umami 收集个人网站统计数据 | Reorx’s Forge Frontend Guide 01: Webpack babel-loader 使用指南 PyYAML 使用技巧 | Reorx’s Forge Tips that may save you from the hell of PyYAML 重新开始使用 RSS 阅读器 | Reorx’s Forge 我的 Vim 自动补全配置变迁史 | Reorx’s Forge 使用 Sonarr 搭建自动化追番系统 | Reorx’s Forge Switch open files quickly in Obsidian A look into Heptabase's split writing experience
Google I/O 2022 Web Platform 新特性展示观看笔记
Reorx · 2022-05-18 · via Blog on Reorx’s Forge

几天前临睡时看了 2022 Google IO 的一个 presentation: What’s new for the web platform, 两位 Google 员工的解说让了解 Web 新技术的过程变得充满乐趣,于是做了些笔记在 Twitter thread 中。这篇文章对笔记进行了整理,并为每个特性附加详细说明的链接。

HTML

<dialog>

https://web.dev/building-a-dialog-component/

<dialog><selectmenu>,基本上所有 UI Kit 都会在组件库里实现的功能,终于被 HTML 原生实现了。如果 HTML 能多一些这种常用的交互组件,我会很乐意手写 Vanilla JS 来使用它们。

https://open-ui.org/prototypes/selectmenu

<input type=datetile-local>

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local

记得 7 年前在豌豆荚工作时,因为这个标签不被 Firefox 支持,被迫找了一个 JavaScript 库来代替 (Pikaday, I still remember)。如今终于可以在主流浏览器上全面通用,太不容易了😭。

CSS

:has selector

https://developer.mozilla.org/en-US/docs/Web/CSS/:has

用于声明父子元素关系的 :has 选择器!这个功能前阵子正好搜索过,现在只能用 JavaScript 实现。

图中的代码可以解释为,在包含 <figcaption><figure> 元素中,将其 children 中的 <img> 增加 1rem 的 bottom margin。

Aspect ratio

https://web.dev/aspect-ratio/

CSS aspect-radio,使元素保持固定的宽高比。这是曾经在 <img> 标签上的实验特性,如今终于被所有元素支持了。

Cascade Layer

https://developer.chrome.com/blog/cascade-layers/

Cascade Layers, 给 CSS 加上了层级的概念,layer 可以自由排列顺序,后面的比前面的有更高的优先级 (specificity);还展示了下越来越复杂的 CSS 优先级关系图,其实也可以把每一级都当做一个 layer。

Container queries

Container queries,在响应式中能够发挥重要作用,但我基本没听懂,未来应该会影响一些 CSS 框架的 API,到时候再来学习吧。

Accent color

https://web.dev/accent-color/

CSS accent-color,为 HTML 基本元素设定一个统一的色调,主流浏览器在一年内都争先恐后地实现了😂,毕竟这是最能体现自己颜值的功能。不知道能不能和操作系统的 accent-color 互通,这样体验就更一致了。

JavaScript

Array.prototype.at

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at

Array 增加了 at 方法,JavaScript 终于可以用类似 Python list[-1] 的写法了。这曾经是我刚学习 JavaScript 时觉得它不如 Python 最主要的原因。

URLPattern

https://web.dev/urlpattern/

新类型 URLPattern,定义 URL 路径中的参数并解析出对应的 object。routing library 不用再写麻烦的正则了

structuredClone

https://web.dev/structured-clone/

有了 structuredClone, 再也不用写 JSON.parse JSON.stringify 这种扭曲心智的代码了,非常适合在面试官问到 deep clone 的问题时反将一军。还可以用来 clone 其他数据结构如 blobs, bitmaps, typed arrays。

createImageBitmap

https://developer.mozilla.org/en-US/docs/Web/API/createImageBitmap

createImageBitmap, 把 blob 直接转化成 Image 对象,改善了一直以来复杂而脆弱的写法。

Miscellaneous

CHIPS

https://developer.chrome.com/docs/privacy-sandbox/chips/

CHIPS 全称 Cookies Having Independent Partitioned State, 是 Cookie 在安全策略上的新特性,为 Set-Cookie 增加了 Partitioned 关键词。可以使特定 cookie 在 iframe 中只用于当前站点。自两年前 SameSite 关键词推广后,third-party cookie 只能选择全有或者全无,这次终于有了一个折中的选择。

Window controls overlay

https://web.dev/window-controls-overlay/

Window controls overlay 是一组 Web app manifests, CSS, JavaScript API 的集合,实现了定制 PWA 窗口在 window bar 部分区域的显示效果,用于获得更有沉浸感的使用体验。