Class WebView
Definition
- Namespace:
- Tizen.WebView
- Assembly:
- Tizen.WebView.dll
- API Level:
- 4
A view used to render the web contents.
public class WebView : EvasObject
- Inheritance
Constructors
View SourceWebView(EvasObject)
Creates a WebView object.
Declaration
public WebView(EvasObject parent)
Parameters
Type | Name | Description |
---|---|---|
EvasObject | parent | Parent object of the WebView. |
API Level: 4
Properties
View SourceContentsSize
Gets size of the content.
Declaration
public Size ContentsSize { get; }
Property Value
Type | Description |
---|---|
Size | size of the coordinate. |
API Level: 6
View SourceHasFocus
Whether a view has the focus.
Declaration
public bool HasFocus { get; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: 4
View SourceLoadProgress
Gets the current load progress of the page.
Declaration
public double LoadProgress { get; }
Property Value
Type | Description |
---|---|
Double | 'value 0.0 to 1.0' on success, otherwise '-1.0'. |
API Level: 6
View SourceScale
Gets the current scale factor of the page.
Declaration
public double Scale { get; }
Property Value
Type | Description |
---|---|
Double |
API Level: 6
View SourceScrollPosition
Get and Sets the scroll position of the page.
Declaration
public Point ScrollPosition { get; set; }
Property Value
Type | Description |
---|---|
Point | The class Point object with X, Y coordinates. |
API Level: 6
View SourceTitle
Current title of the main frame.
Declaration
public string Title { get; }
Property Value
Type | Description |
---|---|
String |
API Level: 4
View SourceUrl
Current URL of the main frame.
Declaration
public string Url { get; }
Property Value
Type | Description |
---|---|
String |
API Level: 4
View SourceUserAgent
Current user agent string of this view.
Declaration
public string UserAgent { get; set; }
Property Value
Type | Description |
---|---|
String |
API Level: 4
Methods
View SourceAddJavaScriptMessageHandler(String, JavaScriptMessageHandler)
Injects the supplied javascript message handler into the view.
Declaration
public bool AddJavaScriptMessageHandler(string name, JavaScriptMessageHandler handler)
Parameters
Type | Name | Description |
---|---|---|
String | name | The message callback. |
JavaScriptMessageHandler | handler | The name used to expose the object in JavaScript. |
Returns
Type | Description |
---|---|
Boolean | 'true' on success, otherwise 'false'. |
API Level: 4
View SourceCanGoBack()
Checks whether it is possible to navigate backward one item in history.
Declaration
public bool CanGoBack()
Returns
Type | Description |
---|---|
Boolean | Whether it is possible to navigate backward one item in history. |
API Level: 4
View SourceCanGoForward()
Checks whether it is possible to navigate forward one item in history.
Declaration
public bool CanGoForward()
Returns
Type | Description |
---|---|
Boolean | Whether it is possible to navigate forward one item in history. |
API Level: 4
View SourceClearBackForwardList()
Clear the back/forward list object of this view.
Declaration
public void ClearBackForwardList()
API Level: 6
View SourceCreateHandle(EvasObject)
Creates a widget handle.
Declaration
protected override IntPtr CreateHandle(EvasObject parent)
Parameters
Type | Name | Description |
---|---|---|
EvasObject | parent | Parent EvasObject. |
Returns
Type | Description |
---|---|
IntPtr | IntPtr of the widget handle. |
Overrides
API Level: 4
View SourceEval(String)
Requests the execution of the given script.
Declaration
public void Eval(string script)
Parameters
Type | Name | Description |
---|---|---|
String | script | The JavaScript code string to execute. |
API Level: 4
View SourceEvalAsync(String)
Requests the evaluation of the given script.
Declaration
public Task<string> EvalAsync(string script)
Parameters
Type | Name | Description |
---|---|---|
String | script | The JavaScript code string to evaluate. |
Returns
Type | Description |
---|---|
Task<String> | A task that contains the result of the evaluation as a string. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown when a script is null or empty string. |
API Level: 8
View SourceEvalWithResult(String, String)
Requests the execution of a given name and the result to the JavaScript runtime.
Declaration
public void EvalWithResult(string name, string result)
Parameters
Type | Name | Description |
---|---|---|
String | name | The name used to expose the object in JavaScript. |
String | result | The result to the JavaScript runtime. |
API Level: 4
View SourceExitFullscreen()
Exit full screen.
Declaration
public void ExitFullscreen()
API Level: 6
View SourceFindText(String, FindOption, Int32)
Searches and highlights the given text string in the document.
Declaration
public void FindText(string text, FindOption option, int maxMatchCount)
Parameters
Type | Name | Description |
---|---|---|
String | text | The text to find. |
FindOption | option | The options to find. |
Int32 | maxMatchCount | The maximum match count to find, unlimited if 0. |
API Level: 6
View SourceGetBackForwardList()
Gets the back/forward list object of this view.
Declaration
public BackForwardList GetBackForwardList()
Returns
Type | Description |
---|---|
BackForwardList | The BackForward List object of this view. |
API Level: 6
View SourceGetContext()
Gets the context object of this view.
Declaration
public Context GetContext()
Returns
Type | Description |
---|---|
Context | The context object of this view. |
API Level: 4
View SourceGetSettings()
Gets the settings object of this view.
Declaration
public Settings GetSettings()
Returns
Type | Description |
---|---|
Settings | The settings object of this view. |
API Level: 4
View SourceGoBack()
Asks the main frame to navigate back in history.
Declaration
public void GoBack()
API Level: 4
View SourceGoForward()
Asks the main frame to navigate forward in history.
Declaration
public void GoForward()
API Level: 4
View SourceLoadHtml(String, String)
Loads the specified HTML string as the content of the view.
Declaration
public void LoadHtml(string html, string baseUrl)
Parameters
Type | Name | Description |
---|---|---|
String | html | HTML data to load. |
String | baseUrl | Base URL used for relative paths to external objects. |
API Level: 4
View SourceLoadUrl(String)
Asks the object to load the given URL.
Declaration
public void LoadUrl(string url)
Parameters
Type | Name | Description |
---|---|---|
String | url | The uniform resource identifier to load. |
Remarks
You can only be sure that the URL changes after UrlChanged event.
API Level: 4
View SourceReload()
Asks the main frame to reload the current document.
Declaration
public void Reload()
API Level: 4
View SourceResume()
Resumes the operation associated with the view.
Declaration
public void Resume()
API Level: 6
View SourceScrollBy(Point)
Scrolls the webpage by the given amount.
Declaration
public void ScrollBy(Point delta)
Parameters
Type | Name | Description |
---|---|---|
Point | delta | The class Point object with X, Y coordinates. |
API Level: 6
View SourceSendOrientation(Orientation)
Sends the orientation of the device.
Declaration
public void SendOrientation(Orientation orientation)
Parameters
Type | Name | Description |
---|---|---|
Orientation | orientation | The new orientation of the device in degree. |
API Level: 6
View SourceSetContextMenuCustomizeDelegate(WebView.ContextMenuCustomize)
Sets the delegate for context menu customization.
Declaration
public void SetContextMenuCustomizeDelegate(WebView.ContextMenuCustomize contextMenuCustomizeDelegate)
Parameters
Type | Name | Description |
---|---|---|
WebView.ContextMenuCustomize | contextMenuCustomizeDelegate | The delegate for context menu customization. |
API Level: 6
View SourceSetFocus(Boolean)
Requests to set or unset a view as the currently focused one.
Declaration
public void SetFocus(bool focused)
Parameters
Type | Name | Description |
---|---|---|
Boolean | focused | 'true' to set the focus on the view, 'false' to remove the focus from the view. |
API Level: 4
View SourceSetScale(Double, Point)
Sets the current scale factor of the page.
Declaration
public void SetScale(double scaleFactor, Point scrollTo)
Parameters
Type | Name | Description |
---|---|---|
Double | scaleFactor | A new level to set. |
Point | scrollTo | The class Point object with X, Y coordinates. |
API Level: 6
View SourceSetUrlRequest(String, HttpMethod, IDictionary<String, String>, String)
Requests loading of the given request data.
Declaration
public void SetUrlRequest(string url, HttpMethod httpMethod, IDictionary<string, string> httpHeaders, string httpBody)
Parameters
Type | Name | Description |
---|---|---|
String | url | The uniform resource identifier to load. |
HttpMethod | httpMethod | The http method. |
IDictionary<String, String> | httpHeaders | The http headers. |
String | httpBody | The http body data. |
API Level: 6
View SourceSetViewVisibility(Boolean)
Sets the current page's visibility.
Declaration
public void SetViewVisibility(bool enable)
Parameters
Type | Name | Description |
---|---|---|
Boolean | enable | 'true' to set on the visibility of the page, 'false' otherwise. |
API Level: 6
View SourceStopLoading()
Asks the main frame to stop loading.
Declaration
public void StopLoading()
API Level: 4
View SourceSuspend()
Suspends the operation associated with the view.
Declaration
public void Suspend()
API Level: 6
Events
View SourceContextMenuItemSelected
Event that occurs when the context menu item selected.
Declaration
public event EventHandler<ContextMenuItemEventArgs> ContextMenuItemSelected
Event Type
Type | Description |
---|---|
EventHandler<ContextMenuItemEventArgs> |
API Level: 6
View SourceLoadError
Event that occurs when the load throws an error.
Declaration
public event EventHandler<SmartCallbackLoadErrorArgs> LoadError
Event Type
Type | Description |
---|---|
EventHandler<SmartCallbackLoadErrorArgs> |
API Level: 4
View SourceLoadFinished
Event that occurs when the load is finished.
Declaration
public event EventHandler LoadFinished
Event Type
Type | Description |
---|---|
EventHandler |
API Level: 4
View SourceLoadStarted
Event that occurs when the load is started.
Declaration
public event EventHandler LoadStarted
Event Type
Type | Description |
---|---|
EventHandler |
API Level: 4
View SourceNavigationPolicyDecideRequested
Event that occurs when the policy navigation is decided.
Declaration
public event EventHandler<NavigationPolicyEventArgs> NavigationPolicyDecideRequested
Event Type
Type | Description |
---|---|
EventHandler<NavigationPolicyEventArgs> |
API Level: 6
View SourceNewWindowPolicyDecideRequested
Event that occurs when the policy new window is decided.
Declaration
public event EventHandler<NewWindowPolicyEventArgs> NewWindowPolicyDecideRequested
Event Type
Type | Description |
---|---|
EventHandler<NewWindowPolicyEventArgs> |
API Level: 6
View SourceResponsePolicyDecideRequested
Event that occurs when the policy response is decided.
Declaration
public event EventHandler<ResponsePolicyEventArgs> ResponsePolicyDecideRequested
Event Type
Type | Description |
---|---|
EventHandler<ResponsePolicyEventArgs> |
API Level: 6
View SourceTitleChanged
Event that occurs when the title of the main frame is changed.
Declaration
public event EventHandler<SmartCallbackArgs> TitleChanged
Event Type
Type | Description |
---|---|
EventHandler<SmartCallbackArgs> |
API Level: 4
View SourceUrlChanged
Event that occurs when the URL of the main frame is changed.
Declaration
public event EventHandler<SmartCallbackArgs> UrlChanged
Event Type
Type | Description |
---|---|
EventHandler<SmartCallbackArgs> |