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

zh-cn: update the translation of IntersectionObserver.takeRecords() #25228

Merged
merged 1 commit into from
Jan 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions files/zh-cn/web/api/intersectionobserver/takerecords/index.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,39 @@
---
title: IntersectionObserver.takeRecords()
title: IntersectionObservertakeRecords() 方法
slug: Web/API/IntersectionObserver/takeRecords
l10n:
sourceCommit: d16706e4e930c57161d473287374a9286c663147
---

{{APIRef("Intersection Observer API")}}

{{domxref("IntersectionObserver")}} 的方法**`takeRecords()`** 返回一个 {{domxref("IntersectionObserverEntry")}} 对象数组,每个对象的目标元素都包含每次相交的信息,可以显式通过调用此方法或隐式地通过观察者的回调自动调用
{{domxref("IntersectionObserver")}} **`takeRecords()`** 方法返回一个 {{domxref("IntersectionObserverEntry")}} 对象数组,每个对象包含目标元素自上次相交检查以来所经历的相交状态变化——可以显式地通过调用此方法或隐式地通过观察器的回调获得

> [!NOTE]
> 如果使用回调来监视这些更改,则无需调用此方法。调用此方法会清除挂起的相交状态列表,因此不会运行回调。

## 语法

```plain
intersectionObserverEntries = intersectionObserver.takeRecords();
```js-nolint
takeRecords()
```

### 参数

None.
无。

### 返回值

{{domxref("IntersectionObserverEntry")}} 对象数组,每个对象包含目标元素与根每次的相交信息
{{domxref("IntersectionObserverEntry")}} 对象数组,每个对象包含目标元素自上次相交检查以来与根的相交状态变化

## Examples

<<<...>>>

## Specifications
## 规范

{{Specifications}}

## Browser compatibility
## 浏览器兼容性

{{Compat}}

## See also
## 参见

- [Intersection Observer API](/zh-CN/docs/Web/API/Intersection_Observer_API)
- [交叉观察器 API](/zh-CN/docs/Web/API/Intersection_Observer_API)
Loading