<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WebView-swift.class/takeStringURLFrom(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WebView(im)takeStringURLFrom:"
  },
  "title" : "takeStringURLFrom(_:)"
}
-->

# takeStringURLFrom(_:)

Sets the receiver’s current location by obtaining a URL string from the sender.

```
@IBAction func takeStringURLFrom(_ sender: Any?)
```

## Parameters

`sender`

The object that sent this message.

## Discussion

This method sets the receiver’s current location to the value obtained by sending a `stringValue` message to `sender`, then starts loading the URL returned by `sender`.

## See Also

[`func load(URLRequest!)`](/documentation/WebKit/WebFrame/load(_:)-47p2s)

Connects to a given URL by initiating an asynchronous client request.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)