title: Get selected text in Safari and use it in action extension
body: <p>I'm making an action extension for safari and I need to get the selected text for use inside the extension.</p>
  
  <p>Usually in iOS i use this code to get the selected text in a webview</p>
  
  <pre><code>selectedText.text = [WebView stringByEvaluatingJavaScriptFromString: @ "window.getSelection (). toString ()"];
  </code></pre>
  
  <p>But inside the extension i don't know how can I do !</p>
  
  <p>For completeness it should be an extension with IU and i've just to turn on NSExtensionActivationSupportsWebURLWithMaxCount to make extension available in Safari. </p>
  
  <p>Thanks in advance</p>