Skip to content

Commit de2ee35

Browse files
Merge branch 'main' into compute_intersection_return
2 parents 96f4ec7 + 6093f7d commit de2ee35

14 files changed

+2970
-321
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Closes #???
2+
3+
The following tasks have been completed:
4+
5+
* [ ] Modified Web platform tests (link to pull request)
6+
7+
Implementation commitment:
8+
9+
* [ ] WebKit (https://bugs.webkit.org/show_bug.cgi?id=)
10+
* [ ] Chromium (https://bugs.chromium.org/p/chromium/issues/detail?id=)
11+
* [ ] Gecko (https://bugzilla.mozilla.org/show_bug.cgi?id=)

.github/workflows/auto-publish.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: CI
2+
on:
3+
pull_request: {}
4+
push:
5+
branches: [main]
6+
jobs:
7+
main:
8+
name: Build, Validate, Deploy
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: w3c/spec-prod@v2
13+
with:
14+
GH_PAGES_BRANCH: gh-pages
15+
TOOLCHAIN: bikeshed
16+
BUILD_FAIL_ON: "link-error"
17+
W3C_NOTIFICATIONS_CC: ${{ secrets.CC }}
18+
W3C_ECHIDNA_TOKEN: ${{ secrets.ECHIDNA_TOKEN }}
19+
W3C_WG_DECISION_URL: https://lists.w3.org/Archives/Public/public-webapps/2014JulSep/0627.html
20+
W3C_BUILD_OVERRIDE: |
21+
status: WD
22+
shortname: intersection-observer

.travis.yml

-15
This file was deleted.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Implementation status:
44
- Chromium: [Shipped in Chrome 51](https://www.chromestatus.com/feature/5695342691483648)
55
- Edge: [Shipped in build 14986](https://developer.microsoft.com/en-us/microsoft-edge/platform/status/intersectionobserver/)
66
- Firefox: [Shipped in Firefox 55](https://platform-status.mozilla.org/#intersection-observer)
7-
- WebKit: [Under development](https://bugs.webkit.org/show_bug.cgi?id=159475)
7+
- WebKit: [Shipped in Safari 12.1 and iOS 12.2](https://developer.apple.com/documentation/safari_release_notes/safari_12_1_release_notes#3130314)
88

99
[Explainer Doc](./explainer.md)
1010

deploy.sh

-74
This file was deleted.

deploy_key.enc

-3.17 KB
Binary file not shown.

explainer.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ This repo outlines an API that can be used to understand movement of DOM element
66

77
## Observing Position
88

9-
The web's traditional position calculation mechanisms rely on explicit queries of DOM state. Some of these are known to cause style recalcuation and layout and, frequently, are redundant thanks to the requirement that scripts poll for this information.
9+
The web's traditional position calculation mechanisms rely on explicit queries of DOM state. Some of these are known to cause style recalculation and layout and, frequently, are redundant thanks to the requirement that scripts poll for this information.
1010

1111
A body of common practice has evolved that relies on these behaviors, however, including (but not limited to):
1212

1313
* Observing the location of "below the fold" sections of content in order to lazy-load content.
1414
* Implementing data-bound high-performance scrolling lists which load and render subsets of data sets. These lists are a central mobile interaction idiom.
15-
* Calculating element visibility. In particular, [ad networks now require reporting of ad "visibility" for monetizing impressions](http://www.iab.net/iablog/2014/03/viewability-has-arrived-what-you-need-to-know-to-see-through-this-sea-change.html). This has led to many sites abusing scroll handlers, [synchronous layout invoking readbacks](http://gent.ilcore.com/2011/03/how-not-to-trigger-layout-in-webkit.html), and resorting to exotic plugin-based solutions for computing "true" element visibility (as a fraction of the element's intended size).
15+
* Calculating element visibility. In particular, [ad networks now require reporting of ad "visibility" for monetizing impressions](https://www.iab.com/news/viewability-has-arrived-what-you-need-to-know-to-see-through-this-sea-change/). This has led to many sites abusing scroll handlers, [synchronous layout invoking readbacks](https://gist.github.com/paulirish/5d52fb081b3570c81e3a), and resorting to exotic plugin-based solutions for computing "true" element visibility (as a fraction of the element's intended size).
1616

1717
These use-cases have several common properties:
1818

@@ -164,7 +164,7 @@ function init() {
164164
// Notify when a scroll-item gets within, or moves beyond, 500px from the visible scroll surface.
165165
var opts = {
166166
root: document.querySelector(".container"),
167-
rootMargin: "500px 0px"
167+
rootMargin: "500px 0px"
168168
};
169169
var observer = new IntersectionObserver(manageItemPositionChanges, opts);
170170
// Set up observer on the items

0 commit comments

Comments
 (0)