Merge pull request #1264 from Tyriar/1021_support_modifiers

Allow support of modifiers with links
This commit is contained in:
Daniel Imms
2018-02-06 02:32:00 -08:00
committed by GitHub
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 {
@@ -323,6 +324,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 {