Hi there,
What can this code do "getPagesWithCompletionHandler"? On this developer page:
Can anybody provide a working sample code in swift, of his function (example when I click on the toolbar button)?
Is that the code to 'get' all the open Safari tabs?
override func toolbarItemClicked(in window: SFSafariWindow) {
page.getPagesWithCompletionHandler(completionHandler: {
each in
each!.dispatchMessageToScript(withName: "runthatscript")
print("for each tab!")
})
}
Kind Regards,
Stefan