Skip to content

Commit 90d1008

Browse files
committed
[문서] 1.7 문서 수정하기 병합충돌 해결
1 parent 5143cc4 commit 90d1008

5 files changed

Lines changed: 1 addition & 27 deletions

File tree

2-ui/1-document/07-modifying-document/1-createtextnode-vs-innerhtml/task.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ importance: 5
66

77
빈 DOM 요소 `elem``text`라는 문자열이 있습니다.
88

9-
<<<<<<< HEAD
109
셋 중에서 같은 동작을 수행하는 명령어는 무엇일까요?
11-
=======
12-
Which of these 3 commands will do exactly the same?
13-
>>>>>>> upstream/master
1410

1511
1. `elem.append(document.createTextNode(text))`
1612
2. `elem.innerHTML = text`

2-ui/1-document/07-modifying-document/10-clock-setinterval/solution.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@ function clockStop() {
5252
}
5353
```
5454

55-
<<<<<<< HEAD
5655
`update()``clockStart()` 에서뿐만 아니라 `(*)`로 표시한 줄에서도 호출됩니다. 양쪽 모두에서 `update()`를 호출하지 않으면 `setInterval`이 실행되기 전까지 사용자는 아무런 내용이 없는 시계를 봐야 하기 때문입니다.
57-
=======
58-
Please note that the call to `update()` is not only scheduled in `clockStart()`, but immediately run in the line `(*)`. Otherwise the visitor would have to wait till the first execution of `setInterval`. And the clock would be empty till then.
5956

60-
Also it is important to set a new interval in `clockStart()` only when the clock is not running. Otherways clicking the start button several times would set multiple concurrent intervals. Even worse - we would only keep the `timerID` of the last interval, losing references to all others. Then we wouldn't be able to stop the clock ever again! Note that we need to clear the `timerID` when the clock is stopped in the line `(**)`, so that it can be started again by running `clockStart()`.
61-
>>>>>>> upstream/master
57+
또한 `clockStart()`에서 새로운 인터벌을 설정하는 것은 시계가 실행 중이지 않을 때만 해야 한다는 점도 중요합니다. 그렇지 않으면 시작 버튼을 여러 번 클릭할 경우 여러 인터벌이 동시에 설정됩니다. 더 심각한 문제는 마지막 인터벌의 `timerID`만 보관하게 되어 나머지 인터벌에 대한 참조를 잃게 된다는 점입니다. 그러면 시계를 다시는 멈출 수 없게 됩니다! `(**)`로 표시한 줄에서 시계가 멈출 때 `timerID`를 초기화해야 한다는 점도 유의하세요. 이렇게 해야 나중에 `clockStart()`를 실행해 시계를 다시 시작할 수 있습니다.
Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
11
이 이상한 동작의 이유는 바로 주어진 HTML이 잘못되었기 때문입니다.
22

3-
<<<<<<< HEAD
43
브라우저는 이를 자동으로 고쳐야 합니다. 그러나 명세에 따르면 `<table>` 안에는 표와 관련된 특정 태그만이 존재할 수 있기 때문에 텍스트가 있어서는 안 됩니다. 따라서 브라우저는 `'aaa'``<table>` *앞에* 추가합니다.
5-
=======
6-
The browser has to fix it automatically. But there may be no text inside the `<table>`: according to the spec only table-specific tags are allowed. So the browser shows `"aaa"` *before* the `<table>`.
7-
>>>>>>> upstream/master
84

95
이제 표를 삭제해도 텍스트가 남아있는 이유가 분명해졌습니다.
106

11-
<<<<<<< HEAD
127
이 문제는 브라우저 도구를 사용해 DOM을 탐색해보면 쉽게 답을 찾을 수 있습니다. 브라우저 도구에서는 `<table>` 앞에 `'aaa'` 가 있는 것으로 표시됩니다.
13-
=======
14-
The question can be easily answered by exploring the DOM using the browser tools. You'll see `"aaa"` before the `<table>`.
15-
>>>>>>> upstream/master
168

179
HTML 표준에는 잘못된 HTML을 수정하는 방법이 구체적으로 정해져 있으므로, 이러한 브라우저의 동작은 올바른 동작입니다.

2-ui/1-document/07-modifying-document/5-why-aaa/task.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ importance: 1
2222
alert(table); // table 은 삭제할 표의 id 입니다.
2323
2424
table.remove();
25-
<<<<<<< HEAD
2625
// 왜 문서 안에 aaa가 남아 있을까요?
27-
=======
28-
// why there's still "aaa" in the document?
29-
>>>>>>> upstream/master
3026
</script>
3127
```

2-ui/1-document/07-modifying-document/6-create-list/task.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,9 @@ importance: 4
88

99
리스트의 모든 요소는 아래 방법으로 생성합니다.
1010

11-
<<<<<<< HEAD
1211
1. `prompt`를 사용해 사용자로부터 리스트의 내용을 입력받습니다.
1312
2. 1번에서 입력받은 내용을 갖는 `<li>` 를 생성한 후 `<ul>` 에 추가합니다.
1413
3. 사용자가 입력을 취소할 때까지 계속합니다 (`ESC` 키나 프롬프트 창의 취소 버튼을 누를 때까지).
15-
=======
16-
1. Ask a user about its content using `prompt`.
17-
2. Create the `<li>` with it and add it to `<ul>`.
18-
3. Continue until the user cancels the input (by pressing `key:Esc` or via an empty entry).
19-
>>>>>>> upstream/master
2014

2115
모든 요소는 동적으로 생성되어야 합니다.
2216

0 commit comments

Comments
 (0)