add method to get preferred web instance out of link

this is a preference that can be put in the link
This commit is contained in:
Bruno Windels
2021-02-04 17:05:18 +01:00
parent 82f16b9231
commit 28fb6dfe9d
6 changed files with 15 additions and 0 deletions
+5
View File
@@ -88,4 +88,9 @@ export class Element {
canInterceptMatrixToLinks(platform) {
return platform === Platform.Android;
}
getPreferredWebInstance(link) {
const idx = trustedWebInstances.indexOf(link.webInstances[this.id])
return idx === -1 ? undefined : trustedWebInstances[idx];
}
}