Files
2026-09-24 16:25:22 +08:00

16 lines
425 B
Plaintext

import { URL } from 'Foundation';
import { UIApplication } from 'UIKit';
export function openWeb(url : string) {
let href = new URL(string = url)
if (UTSiOS.available("iOS 16.0, *")) {
if (UIApplication.shared.canOpenURL(href!)) {
UIApplication.shared.open(href!, options= new Map(), completionHandler= nil)
}
}else{
if (UIApplication.shared.canOpenURL(href!)) {
UIApplication.shared.openURL(href!)
}
}
}