Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[오번역수정] Part 2 - 2.1 브라우저 이벤트 소개 #1792

Open
@luckfeat

Description

@luckfeat

오번역

Image

event.currenTarget(오번역)

이벤트를 처리하는 요소. 화살표 함수를 사용해 핸들러를 만들거나 다른 곳에 바인딩하지 않은 경우엔 this가 가리키는 값과 같음, 화살표 함수를 사용했거나 함수를 다른 곳에 바인딩한 경우엔 event.currentTarget를 사용해 이벤트가 처리되는 요소 정보를 얻을 수 있음

원문

Element that handled the event. That’s exactly the same as this, unless the handler is an arrow function, or its this is bound to something else, then we can get the element from event.currentTarget.

번역

수정 후

이벤트를 처리하는 요소. 보통 this가 가리키는 값과 동일하지만, 핸들러가 화살표 함수로 작성되었거나 this가 다른 곳에 바인딩된 경우에는 this가 달라지므로, 이때는 event.currentTarget을 사용해 이벤트가 처리된 요소를 얻을 수 있음.

이슈

(원문) same as this, unless the handler is an arrow function, or its this is bound to something else
(오역) 화살표 함수를 사용해 핸들러를 만들거나 다른 곳에 바인딩하지 않은 경우엔 this가 가리키는 값과 같음

원문은 unless라는 접속사를 사용해 “event.currentTarget과 this의 값이 일치하지만, 화살표 함수거나 다른 곳에 바인딩 된 경우에는 다르다"라는 예외 상황을 설명합니다.

그러나 번역은 이 unless 구문을 다르게 해석해 “화살표 함수를 사용해 핸들러를 만들거나 다른 곳에 바인딩하지 않은 경우엔 this가 가리키는 값과 같음”라고 서술해, 일부는 맞지만 나머지 조건이 반대로 전달되어 오해의 소지를 만들고 있습니다.

원문과 비교했을 때, 화살표 함수로 작성된 핸들러 내부에서 this와 event.currentTarget이 동일하다는 서술은 오역이고, this가 다른 곳에 바인딩되지 않았을 때 두 값이 일치한다는 설명은 올바릅니다.

위 내용을 근거로 부분적 오류를 수정했습니다.

추가

화살표 함수는 상위 컨텍스트의 this를 캡처하므로, 별도로 상위 this를 세팅하지 않았다면 이벤트 핸들러 내부에서 this가 DOM 요소를 가리키지 않습니다. 따라서 this는 event.currentTarget과 일치하지 않습니다.

Pull Request(PR)를 통해 수정할 의향이 있습니까?

네, 있습니다.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp