Skip to content

Commit 6ca5e07

Browse files
committed
Translate Event: which-handlers-run
1 parent 1002da0 commit 6ca5e07

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
The answer: `1` and `2`.
1+
Jawabannya: `1` dan `2`.
22

3-
The first handler triggers, because it's not removed by `removeEventListener`. To remove the handler we need to pass exactly the function that was assigned. And in the code a new function is passed, that looks the same, but is still another function.
3+
Pengendali pertama dijalankan, karena tidak di hapuskan oleh `removeEventListener`. Untuk menhapuskan pengendali kita harus meneruskan secara tepat fungsi yang telah di atrus. Dan pada kode sebuah fungsi baru di teruskan, terlihat sama, tapi berbeda fungsi.
44

5-
To remove a function object, we need to store a reference to it, like this:
5+
Untuk menghapuskan objek fungsi, kita harus menyimpan refensi ke fungsi tersebut, seperti ini:
66

77
```js
88
function handler() {
@@ -13,4 +13,4 @@ button.addEventListener("click", handler);
1313
button.removeEventListener("click", handler);
1414
```
1515

16-
The handler `button.onclick` works independently and in addition to `addEventListener`.
16+
Pengendali `button.onclick` bekerja secara sendiri dan sebagai tambahan untuk `addEvenetListener`.

2-ui/2-events/01-introduction-browser-events/03-which-handlers-run/task.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ importance: 5
22

33
---
44

5-
# Which handlers run?
5+
# Pengendali mana yang dijalankan?
66

7-
There's a button in the variable. There are no handlers on it.
7+
Ada sebuah tombol pada variable. Tidak ada pengedali di tombol tersebut.
88

9-
Which handlers run on click after the following code? Which alerts show up?
9+
Manakah pengendali yang dijalankan pada saat klik pada kode berikut ini? Manakah `alert` yang akan ditunjukan?
1010

1111
```js no-beautify
1212
button.addEventListener("click", () => alert("1"));

0 commit comments

Comments
 (0)