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 });
|
chrome.tabs.create({ url: url });
|
||||||
return null;
|
return null;
|
||||||
} else if (BrowserApi.isSafariApi) {
|
} else if (BrowserApi.isSafariApi) {
|
||||||
// TODO
|
SafariApp.sendMessageToApp('createNewTab', url, true);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -151,6 +151,9 @@ class SafariExtensionViewController: SFSafariExtensionViewController, WKScriptMe
|
||||||
} else if command == "isPopoverOpen" {
|
} else if command == "isPopoverOpen" {
|
||||||
m!.responseData = popoverOpenCount > 0 ? "true" : "false";
|
m!.responseData = popoverOpenCount > 0 ? "true" : "false";
|
||||||
replyMessage(message: m!)
|
replyMessage(message: m!)
|
||||||
|
} else if command == "createNewTab" {
|
||||||
|
// TODO
|
||||||
|
replyMessage(message: m!)
|
||||||
} else if command == "reloadExtension" {
|
} else if command == "reloadExtension" {
|
||||||
webView?.reload()
|
webView?.reload()
|
||||||
replyMessage(message: m!)
|
replyMessage(message: m!)
|
||||||
|
|
Loading…
Reference in New Issue