Skip to content

Commit 50e6346

Browse files
committed
Use arrow function rather than bind(this), as requested in review.
1 parent 4c81e1a commit 50e6346

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

ts/a11y/explorer/KeyExplorer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2051,18 +2051,18 @@ export class SpeechExplorer
20512051
*/
20522052
protected addHtmlEvents() {
20532053
for (const html of Array.from(this.node.querySelectorAll('mjx-html'))) {
2054-
const stop = function (event: Event) {
2054+
const stop = (event: Event) => {
20552055
if (html.contains(document.activeElement)) {
20562056
if (event instanceof KeyboardEvent) {
20572057
this.clicked = null;
20582058
if (event.key !== 'Tab' && event.key !== 'Escape') {
20592059
event.stopPropagation();
20602060
}
20612061
} else {
2062-
this.clicked = event.target;
2062+
this.clicked = event.target as HTMLElement;
20632063
}
20642064
}
2065-
}.bind(this);
2065+
};
20662066
html.addEventListener('mousedown', stop);
20672067
html.addEventListener('click', stop);
20682068
html.addEventListener('keydown', stop);

0 commit comments

Comments
 (0)