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

推荐订阅源

Cisco Talos Blog
Cisco Talos Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
爱范儿
爱范儿
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Jina AI
Jina AI
雷峰网
雷峰网
The Register - Security
The Register - Security
The Cloudflare Blog
博客园 - 【当耐特】
M
MIT News - Artificial intelligence
I
InfoQ
博客园 - 三生石上(FineUI控件)
H
Help Net Security
博客园 - 司徒正美
Vercel News
Vercel News
WordPress大学
WordPress大学
S
SegmentFault 最新的问题
云风的 BLOG
云风的 BLOG
B
Blog
Google DeepMind News
Google DeepMind News
B
Blog RSS Feed
L
LangChain Blog
人人都是产品经理
人人都是产品经理
GbyAI
GbyAI
T
The Blog of Author Tim Ferriss
T
Tailwind CSS Blog
aimingoo的专栏
aimingoo的专栏
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Recorded Future
Recorded Future
小众软件
小众软件
Martin Fowler
Martin Fowler
罗磊的独立博客
Stack Overflow Blog
Stack Overflow Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
酷 壳 – CoolShell
酷 壳 – CoolShell
腾讯CDC
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Apple Machine Learning Research
Apple Machine Learning Research
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - Franky
Hugging Face - Blog
Hugging Face - Blog
Y
Y Combinator Blog
V
Visual Studio Blog
F
Fortinet All Blogs
Microsoft Azure Blog
Microsoft Azure Blog
大猫的无限游戏
大猫的无限游戏
Engineering at Meta
Engineering at Meta
N
Netflix TechBlog - Medium
V
V2EX
Blog — PlanetScale
Blog — PlanetScale

Recent Commits to visual-viewport:gh-pages

archive this repo · WICG/visual-viewport@03de238 [Viewport Segments] Cleanup the existing explainer. · WICG/visual-viewport@8948a2a Viewport Segments: Fix mitigation by removing the focused area one (#88) · WICG/visual-viewport@ce02d5d Update Viewport Segments explainer. (#86) Add Security and Privacy self assessment for the viewport segments pr… Update link to draft spec · WICG/visual-viewport@44deaba Improve CG report metadata Link to fire an event definition · WICG/visual-viewport@74efebe Add definition of visual and layout viewports Minor editorial clean-ups · WICG/visual-viewport@0317366 Specify resize and scroll event ordering (#80) Update JS example Update with previous changes Fix markdown links · WICG/visual-viewport@56af3e0 Address Daniel's changes Update README with segments explainer · WICG/visual-viewport@fb277c9 Update image path Add segments-explainer Merge pull request #77 from dlibby-/dlibby-segments-typo · WICG/visual-viewport@9d2419c
Code update · WICG/visual-viewport@ffb31ee
ststimac · 2021-09-27 · via Recent Commits to visual-viewport:gh-pages

This repository was archived by the owner on Mar 12, 2026. It is now read-only.

File tree

Original file line numberDiff line numberDiff line change

@@ -97,6 +97,7 @@ Additionally, there are a number of new [environment variables](https://drafts.c

9797
9898

#### JavaScript solution outline:

9999
100+

```js

100101

window.onresize = function() {

101102

const segments = window.visualViewport.segments;

102103

if (segments && segments.length > 1) {

@@ -105,3 +106,4 @@ window.onresize = function() {

105106

// Reset state to single viewport (normal responsive layout).

106107

}

107108

}

109+

```