Remote tabs: finishing touches
This commit is contained in:
@@ -21,8 +21,8 @@ class Tab: NSObject, SBRProcessBundleBridgeDelegate
|
||||
get {
|
||||
TabInfo(
|
||||
title: loadedWebView?.title,
|
||||
url: loadedWebView?.url ?? self.homeURL,
|
||||
favicon: self.favicon,
|
||||
urlString: loadedWebView?.url?.absoluteString ?? self.homeURL?.absoluteString,
|
||||
faviconData: self.favicon?.pngData(),
|
||||
identifier: self.identifier
|
||||
)
|
||||
}
|
||||
@@ -45,7 +45,15 @@ class Tab: NSObject, SBRProcessBundleBridgeDelegate
|
||||
|
||||
private var loadedWebView: WKWebView? = nil
|
||||
public var title: String? { get { tabInfo.title } }
|
||||
public var url: URL? { get { tabInfo.url } }
|
||||
public var url: URL? {
|
||||
get {
|
||||
if let urlString = tabInfo.urlString {
|
||||
return URL(string: urlString)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
public var javaScriptEnabled: Bool = false {
|
||||
didSet { bridge.allowAllScripts = javaScriptEnabled }
|
||||
|
||||
Reference in New Issue
Block a user