Skip to content

Commit eca29f5

Browse files
committed
minor
1 parent db18204 commit eca29f5

File tree

2 files changed

+4
-4
lines changed
  • 2-ui/2-events/03-event-delegation
  • 4-frames-and-windows/06-clickjacking/protector.view

2 files changed

+4
-4
lines changed

2-ui/2-events/03-event-delegation/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ table.onclick = function(event) {
102102
Explanations:
103103
1. The method `elem.closest(selector)` returns the nearest ancestor that matches the selector. In our case we look for `<td>` on the way up from the source element.
104104
2. If `event.target` is not inside any `<td>`, then the call returns `null`, and we don't have to do anything.
105-
3. In case of nested tables, `event.target` may be a `<td>` outside of the current table. So we check if that's actually *our* `<td>`.
106-
4. And, if it is so, highlight it.
105+
3. In case of nested tables, `event.target` may be a `<td>` lying outside of the current table. So we check if that's actually *our table's* `<td>`.
106+
4. And, if it's so, then highlight it.
107107

108108
## Delegation example: actions in markup
109109

4-frames-and-windows/06-clickjacking/protector.view/iframe.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333

3434
This text is always visible.
3535

36-
But if the page is shown inside a document from another domain, the div over it prevents any actions.
36+
But if the page was open inside a document from another domain, the div over it would prevent any actions.
3737

38-
<button onclick="alert(1)">Click doesn't work in that case</button>
38+
<button onclick="alert(1)">Click wouldn't work in that case</button>
3939

4040
</body>
4141
</html>

0 commit comments

Comments
 (0)