Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use FrozenArray<double> for IntersectionObserver's thresholds attribute #114

Closed
foolip opened this issue Mar 11, 2016 · 9 comments
Closed
Assignees

Comments

@foolip
Copy link
Member

foolip commented Mar 11, 2016

https://wicg.github.io/IntersectionObserver/#intersection-observer-interface

This is very similar to Notification's vibrate and action attributes:
https://notifications.spec.whatwg.org/#api

As it is, this would return a new array every time.

@annevk @bzbarsky @domenic

@domenic
Copy link

domenic commented Mar 11, 2016

This is important. Please do not ship thresholds in the current state.

@foolip
Copy link
Member Author

foolip commented Mar 11, 2016

Right, I got here from Intent to Ship: Intersection Observer on blink-dev.

@slightlyoff
Copy link
Collaborator

It's unclear why a new array each time is problematic in this case. Is the concern allocation or some other semantic issue (e.g. side-channels)?

@annevk
Copy link
Member

annevk commented Mar 31, 2016

Semantic. It's important to preserve x.prop === x.prop.

@ojanvafai
Copy link
Collaborator

Why is it important? (honest question)

@domenic
Copy link

domenic commented Mar 31, 2016

@foolip
Copy link
Member Author

foolip commented Sep 23, 2016

Ping? Blink's IDL file already uses FrozenArray<double> for this.

@foolip
Copy link
Member Author

foolip commented Jan 11, 2017

Ping again.

@ojanvafai
Copy link
Collaborator

@szager-chromium looks like the spec here needs updating.

webkit-commit-queue pushed a commit to Ahmad-S792/WebKit that referenced this issue Aug 14, 2023
https://bugs.webkit.org/show_bug.cgi?id=260129

Reviewed by Ryosuke Niwa.

This patch is to align WebKit with Web-Spec [1] and Blink / Chromium.

[1] https://www.w3.org/TR/intersection-observer/#intersection-observer-interface

GitHub Issue: w3c/IntersectionObserver#114

* Source/WebCore/page/IntersectionObserver.idl: Update
* LayoutTests/imported/w3c/web-platform-tests/intersection-observer/idlharness.window-expected.txt: Rebaselined

Canonical link: https://commits.webkit.org/266857@main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants