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

[ko] document.scripts 신규 번역 #23661

Merged
merged 3 commits into from
Sep 29, 2024
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
34 changes: 34 additions & 0 deletions files/ko/web/api/document/scripts/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: Document.scripts
slug: Web/API/Document/scripts
l10n:
sourceCommit: 904f8c3d9c8a54e917f8db565bcfe58f976d859c
---

{{APIRef("DOM")}}

**`scripts`** 는 {{domxref("Document")}}인터페이스의 속성으로 문서 중{{HTMLElement("script")}} 요소의 목록을 반환합니다. 반환되는 객체는 단일 {{domxref("HTMLCollection")}} 객체입니다.

## 값

{{domxref("HTMLCollection")}}입니다. 이를 사용하여 목록의 모든 요소를 배열처럼 가져올 수 있습니다.

## 예제

다음은 페이지 내 {{HTMLElement("script")}} 요소의 존재를 확인하는 예시입니다.

```js
let scripts = document.scripts;

if (scripts.length) {
alert("This page has scripts!");
}
```

## 명세서

{{Specifications}}

## 브라우저 호환성

{{Compat}}