|
@@ -11,6 +11,18 @@
|
|
|
*
|
|
|
**/
|
|
|
|
|
|
+// open <a href="..."> links with the Tauri API
|
|
|
+document.querySelector('body').addEventListener('click', e => {
|
|
|
+ let target = e.target
|
|
|
+ while (target != null) {
|
|
|
+ if (target.matches ? target.matches('a') : target.msMatchesSelector('a')) {
|
|
|
+ tauri.open(target.href)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ target = target.parentElement
|
|
|
+ }
|
|
|
+}, true)
|
|
|
+
|
|
|
/**
|
|
|
* @module tauri
|
|
|
* @description This API interface makes powerful interactions available
|