create new tab via safari app message
This commit is contained in:
parent
0f3cef7762
commit
fc7bbed965
|
@ -184,7 +184,7 @@ export class BrowserApi {
|
|||
chrome.tabs.create({ url: url });
|
||||
return null;
|
||||
} else if (BrowserApi.isSafariApi) {
|
||||
// TODO
|
||||
SafariApp.sendMessageToApp('createNewTab', url, true);
|
||||
return;
|
||||
} else {
|
||||
return;
|
||||
|
|
|
@ -151,6 +151,9 @@ class SafariExtensionViewController: SFSafariExtensionViewController, WKScriptMe
|
|||
} else if command == "isPopoverOpen" {
|
||||
m!.responseData = popoverOpenCount > 0 ? "true" : "false";
|
||||
replyMessage(message: m!)
|
||||
} else if command == "createNewTab" {
|
||||
// TODO
|
||||
replyMessage(message: m!)
|
||||
} else if command == "reloadExtension" {
|
||||
webView?.reload()
|
||||
replyMessage(message: m!)
|
||||
|
|
Loading…
Reference in New Issue