Class WebView

Definition

Namespace:
Tizen.WebView
Assembly:
Tizen.WebView.dll
API Level:
4

A view used to render the web contents.

C#
Copy
public class WebView : EvasObject
Inheritance
WebView

Constructors

View Source

WebView(EvasObject)

Creates a WebView object.

Declaration
C#
Copy
public WebView(EvasObject parent)
Parameters
Type Name Description
EvasObject parent

Parent object of the WebView.

API Level: 4

Properties

View Source

HasFocus

Whether a view has the focus.

Declaration
C#
Copy
public bool HasFocus { get; }
Property Value
Type Description
Boolean
API Level: 4
View Source

Title

Current title of the main frame.

Declaration
C#
Copy
public string Title { get; }
Property Value
Type Description
System.String
API Level: 4
View Source

Url

Current URL of the main frame.

Declaration
C#
Copy
public string Url { get; }
Property Value
Type Description
System.String
API Level: 4
View Source

UserAgent

Current user agent string of this view.

Declaration
C#
Copy
public string UserAgent { get; set; }
Property Value
Type Description
System.String
API Level: 4

Methods

View Source

AddJavaScriptMessageHandler(String, JavaScriptMessageHandler)

Injects the supplied javascript message handler into the view.

Declaration
C#
Copy
public bool AddJavaScriptMessageHandler(string name, JavaScriptMessageHandler handler)
Parameters
Type Name Description
System.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 Source

CanGoBack()

Checks whether it is possible to navigate backward one item in history.

Declaration
C#
Copy
public bool CanGoBack()
Returns
Type Description
Boolean

Whether it is possible to navigate backward one item in history.

API Level: 4
View Source

CanGoForward()

Checks whether it is possible to navigate forward one item in history.

Declaration
C#
Copy
public bool CanGoForward()
Returns
Type Description
Boolean

Whether it is possible to navigate forward one item in history.

API Level: 4
View Source

CreateHandle(EvasObject)

Creates a widget handle.

Declaration
C#
Copy
protected override IntPtr CreateHandle(EvasObject parent)
Parameters
Type Name Description
EvasObject parent

Parent EvasObject.

Returns
Type Description
System.IntPtr

IntPtr of the widget handle.

Overrides
API Level: 4
View Source

Eval(String)

Requests the execution of the given script.

Declaration
C#
Copy
public void Eval(string script)
Parameters
Type Name Description
System.String script

The JavaScript code string to execute.

API Level: 4
View Source

EvalWithResult(String, String)

Requests the execution of a given name and the result to the JavaScript runtime.

Declaration
C#
Copy
public void EvalWithResult(string name, string result)
Parameters
Type Name Description
System.String name

The name used to expose the object in JavaScript.

System.String result

The result to the JavaScript runtime.

API Level: 4
View Source

GetContext()

Gets the context object of this view.

Declaration
C#
Copy
public Context GetContext()
Returns
Type Description
Context

The context object of this view.

API Level: 4
View Source

GetSettings()

Gets the settings object of this view.

Declaration
C#
Copy
public Settings GetSettings()
Returns
Type Description
Settings

The settings object of this view.

API Level: 4
View Source

GoBack()

Asks the main frame to navigate back in history.

Declaration
C#
Copy
public void GoBack()
API Level: 4
View Source

GoForward()

Asks the main frame to navigate forward in history.

Declaration
C#
Copy
public void GoForward()
API Level: 4
View Source

LoadHtml(String, String)

Loads the specified HTML string as the content of the view.

Declaration
C#
Copy
public void LoadHtml(string html, string baseUrl)
Parameters
Type Name Description
System.String html

HTML data to load.

System.String baseUrl

Base URL used for relative paths to external objects.

API Level: 4
View Source

LoadUrl(String)

Asks the object to load the given URL.

Declaration
C#
Copy
public void LoadUrl(string url)
Parameters
Type Name Description
System.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 Source

Reload()

Asks the main frame to reload the current document.

Declaration
C#
Copy
public void Reload()
API Level: 4
View Source

SetFocus(Boolean)

Requests to set or unset a view as the currently focused one.

Declaration
C#
Copy
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 Source

StopLoading()

Asks the main frame to stop loading.

Declaration
C#
Copy
public void StopLoading()
API Level: 4

Events

View Source

LoadError

Event that occurs when the load throws an error.

Declaration
C#
Copy
public event EventHandler<SmartCallbackLoadErrorArgs> LoadError
Event Type
Type Description
System.EventHandler<SmartCallbackLoadErrorArgs>
API Level: 4
View Source

LoadFinished

Event that occurs when the load is finished.

Declaration
C#
Copy
public event EventHandler LoadFinished
Event Type
Type Description
EventHandler
API Level: 4
View Source

LoadStarted

Event that occurs when the load is started.

Declaration
C#
Copy
public event EventHandler LoadStarted
Event Type
Type Description
EventHandler
API Level: 4
View Source

TitleChanged

Event that occurs when the title of the main frame is changed.

Declaration
C#
Copy
public event EventHandler<SmartCallbackArgs> TitleChanged
Event Type
Type Description
System.EventHandler<SmartCallbackArgs>
API Level: 4
View Source

UrlChanged

Event that occurs when the URL of the main frame is changed.

Declaration
C#
Copy
public event EventHandler<SmartCallbackArgs> UrlChanged
Event Type
Type Description
System.EventHandler<SmartCallbackArgs>
API Level: 4

Extension Methods