WebView.GetSource
-----------------

Queries the html source from the web viewer.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [WebView](component_WebView.md) | [1.5](newinversion15.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ✅ Yes |

MBS( "WebView.GetSource"; WebViewerRef ) 

**MBS**( **"WebView.GetSource";** /\* Queries the html source from the web viewer. \*/  
**$WebViewerRef**) /\* Either the Web Viewer Object Name or the Web Viewer ID as returned by "[WebView.FindByName](WebViewFindByName.md)" function. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| WebViewerRef | Either the Web Viewer Object Name or the Web Viewer ID as returned by "[WebView.FindByName](WebViewFindByName.md)" function. |  |

### Result

The HTML text.

### Description

Queries the html source from the web viewer.  
This is the original downloaded source. If you want the source of what is visible, please use [WebView.GetHTMLText](WebViewGetHTMLText.md) function.  
Text is considered either being valid UTF-8 or ISO Latin1 text encoded.  
### See also

- [WebView.FindByName](WebViewFindByName.md)
- [WebView.GetForm](WebViewGetForm.md)
- [WebView.GetHTMLText](WebViewGetHTMLText.md)
- [WebView.GetSilent](WebViewGetSilent.md)
- [WebView.GetSourceData](WebViewGetSourceData.md)

### Release notes

- **Version 13.3**
    - Fixed [WebView.GetSourceData](https://www.mbsplugins.eu/WebViewGetSourceData.shtml) to return empty result if no data is available.

This function checks for a license.

Created 18th August 2014 , last changed 4th June 2020

  
[WebView.GetSilent](WebViewGetSilent.md) - [WebView.GetSourceData](WebViewGetSourceData.md)

[HTML Version](WebViewGetSource.shtml)