Skip to content

Commit

Permalink
Enhance link option to be strict
Browse files Browse the repository at this point in the history
  • Loading branch information
falsandtru committed Jan 29, 2024
1 parent 379fa00 commit 3076b48
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 3.42.0

- Enhance `link` option to be strict.

## 3.41.1

- Fix dependencies.
Expand Down
1 change: 1 addition & 0 deletions src/layer/interface/module/view/click.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export class ClickView extends Coroutine<never> {
super(async function* () {
return this.finally(delegate(document, selector, 'click', ev => {
if (!(ev.currentTarget instanceof HTMLAnchorElement || ev.currentTarget instanceof HTMLAreaElement)) return;
if (!ev.currentTarget.matches(selector)) return;
assert(typeof ev.currentTarget.href === 'string');
listener(ev);
}));
Expand Down

0 comments on commit 3076b48

Please sign in to comment.