Skip to content

Commit

Permalink
feat: forward mouse event to callback handler in server-html directive (
Browse files Browse the repository at this point in the history
  • Loading branch information
dhhyi authored Jun 29, 2021
1 parent e731fec commit 478c096
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/core/directives/server-html.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { LinkParser } from 'ish-core/utils/link-parser';
})
export class ServerHtmlDirective implements AfterContentInit, AfterViewInit, OnChanges {
@Input() callbacks: {
[key: string]: () => void;
[key: string]: (event?: MouseEvent) => void;
};

constructor(
Expand Down Expand Up @@ -84,7 +84,7 @@ export class ServerHtmlDirective implements AfterContentInit, AfterViewInit, OnC

// handle links with callback functions, e.g. <a callback="availableCallbackFunction">
if (cb && this.callbacks && typeof this.callbacks[cb] === 'function') {
this.callbacks[cb]();
this.callbacks[cb](event);
}

if (
Expand Down

0 comments on commit 478c096

Please sign in to comment.