Allow support of modifiers with links

Fixes #1021
This commit is contained in:
Daniel Imms
2018-01-31 17:42:33 -08:00
parent 62d6c242fc
commit 2ac5a8da49
5 changed files with 37 additions and 12 deletions
+8
View File
@@ -161,6 +161,7 @@ export interface ILinkMatcher {
matchIndex?: number;
validationCallback?: LinkMatcherValidationCallback;
priority?: number;
willLinkActivate?: (event: MouseEvent, uri: string) => boolean;
}
export interface ICharset {
@@ -321,6 +322,13 @@ export interface ILinkMatcherOptions {
* default value is 0.
*/
priority?: number;
/**
* A callback that fires when the mousedown and click events occur that
* determines whether a link will be activated upon click. This enables
* only activating a link when a certain modifier is held down, if not the
* mouse event will continue propagation (eg. double click to select word).
*/
willLinkActivate?: (event: MouseEvent, uri: string) => boolean;
}
export interface IBrowser {