[번역 및 충돌 해결] 2-ui/2-events upstream 동기화 (C25)#1866
Open
sohxxny wants to merge 4 commits into
Open
Conversation
Author
|
@Jeongbin1 안녕하세요 정빈님! 리뷰 부탁드립니다~! |
Jeongbin1
reviewed
May 17, 2026
Comment on lines
-361
to
-371
| <<<<<<< HEAD | ||
| `event.clientX / event.clientY` | ||
| : 포인터 관련 이벤트에서, 커서의 상대 좌표(모니터 기준 좌표가 아닌, 브라우저 화면 기준 좌표 - 옮긴이) | ||
|
|
||
| 이 외에도 다양한 프로퍼티가 있습니다. 이벤트 타입에 따라 이벤트 객체에서 제공하는 프로퍼티는 다릅니다. 추후 다양한 종류의 이벤트를 학습하면서 이벤트별 프로퍼티에 대해서도 상세히 알아보겠습니다. | ||
| ======= | ||
| `event.clientX` / `event.clientY` | ||
| : Window-relative coordinates of the cursor, for pointer events. | ||
|
|
||
| There are more properties. Many of them depend on the event type: keyboard events have one set of properties, pointer events - another one, we'll study them later when as we move on to the details of different events. | ||
| >>>>>>> upstream/master |
There was a problem hiding this comment.
해당 부분 영어 원문에서는 event.clientX / event.clientY 이렇게 따로 백틱 안에 넣어주어서 반영하면 좋을 것 같습니다!
Comment on lines
-143
to
-151
| <<<<<<< HEAD | ||
| **캡처링 단계를 이용해야 하는 경우는 흔치 않기 때문에, 이전까진 주로 버블링만 설명했습니다. 캡처링에 관한 코드를 발견하는 일은 거의 없을 겁니다.** | ||
|
|
||
| `on<event>` 프로퍼티나 HTML 속성, `addEventListener(event, handler)`를 이용해 할당된 핸들러는 캡처링에 대해 전혀 알 수 없습니다. 이 핸들러들은 두 번째 혹은 세 번째 단계의 이벤트 흐름(타깃 단계와 버블링 단계)에서만 동작합니다. | ||
| ======= | ||
| Until now, we only talked about bubbling, because the capturing phase is rarely used. | ||
|
|
||
| In fact, the capturing phase was invisible for us, because handlers added using `on<event>`-property or using HTML attributes or using two-argument `addEventListener(event, handler)` don't know anything about capturing, they only run on the 2nd and 3rd phases. | ||
| >>>>>>> upstream/master |
|
|
||
| <<<<<<< HEAD | ||
| 1. `HTML` -> `BODY` -> `FORM` -> `DIV` (캡처링 단계, 첫 번째 리스너) | ||
| 2. `P` (타깃 단계, 캡쳐링과 버블링 둘 다에 리스너를 설정했기 때문에 두 번 호출됩니다.) |
There was a problem hiding this comment.
기존 번역이긴 하지만, 캡처링 / 캡쳐링 중 하나로 통일하면 좋을 것 같습니다
다른 문서에서 캡쳐링을 쓰는 경우도 있지만, 해당 문서에서는 캡처링을 주로 쓰는 것 같네요!
Comment on lines
+273
to
+229
| The same for event handlers. The code that set the handler on a particular element knows maximum details about the element and what it does. A handler on a particular `<td>` may be suited for that exactly `<td>`, it knows everything about it, so it should get the chance first. Then its immediate parent also knows about the context, but a little bit less, and so on till the very top element that handles general concepts and runs the last one. | ||
| >>>>>>> upstream/master | ||
| 이벤트 핸들러도 이와 같은 논리로 만들어졌습니다. 특정 요소에 할당된 핸들러는 그 요소에 대한 자세한 사항과 무슨 일을 해야 할지 가장 잘 알고 있습니다. `<td>`에 할당된 핸들러는 `<td>`에 대한 모든 것을 알고 있기 때문에 `<td>`를 다루는데 가장 적합합니다. 따라서 `<td>`를 다룰 기회를 이 요소에 할당된 핸들러에게 가장 먼저 주는 것입니다. 바로 위 부모 요소도 자식 요소만큼은 아니지만 컨텍스트를 알고 있으며, 이런 식으로 최상위 요소까지 거슬러 올라가 마지막에는 가장 일반적인 개념을 다루는 핸들러가 실행됩니다. |
There was a problem hiding this comment.
컨텍스트를 알고 있다는 표현을 조금 더 풀어 쓰면 어떨까요?
제가 생각했을 때는 관련 맥락 이나 해당 요소가 놓인 맥락 정도가 어떨까 싶습니다 (더 좋은 표현이 있다면 그것도 좋습니다!)
Author
There was a problem hiding this comment.
용어집에서 context를 컨텍스트로 사용하고 있어 고민하다 이렇게 번역했던 것인데 이 문장에서의 context는 기술 용어가 아닌 일반 용어라 좀 더 풀어쓰는게 맞아보이네요. 제가 생각하기에 '관련 맥락' 이상으로 컴팩트하게 의미를 전달할 수 있는 단어가 없는 것 같아 '관련 맥락'으로 수정했습니다! 감사합니다! (4ef00d3)
| <<<<<<< HEAD | ||
| 커스텀 이벤트의 이름을 `click`나 `keydown` 같이 브라우저 내장 이벤트처럼 지을 수 있긴 한데, 이런 경우엔 아주 조심해야 합니다. | ||
|
|
||
| 되도록이면 내장 이벤트와 같은 이름을 가진 브라우저 이벤트를 만들지 말도록 합시다. 대부분의 경우 설계 관점에서 아주 좋지 않은 영항을 끼치기 때문입니다. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요약
2-ui/2-events 섹션의 upstream 변경사항을 반영하고 충돌을 해결했습니다.
변경 파일 (5개)
01-introduction-browser-events02-bubbling-and-capturing03-event-delegation04-default-browser-action05-dispatch-events주요 변경사항
mouse.onclick으로 잘못 표기된 내용을menu.onclick로 수정연관 이슈
없음
Pull Request 체크리스트
TODO