You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit eca29f5
Browse filesBrowse the repository at this point in the historyBrowse files
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.
104
104
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>`.
0 commit comments