Class WebView

    Definition

    Namespace:
    Tizen.WebView
    Assembly:
    Tizen.WebView.dll

    A view used to render the web contents.

    public class WebView : EvasObject
    Inheritance
    object
    EvasObject
    WebView

    Constructors

    View Source

    WebView(EvasObject)

    Creates a WebView object.

    Declaration
    public WebView(EvasObject parent)
    Parameters
    Type Name Description
    EvasObject parent

    Parent object of the WebView.

    Properties

    View Source

    HasFocus

    Whether a view has the focus.

    Declaration
    public bool HasFocus { get; }
    Property Value
    Type Description
    bool
    View Source

    Title

    Current title of the main frame.

    Declaration
    public string Title { get; }
    Property Value
    Type Description
    string
    View Source

    Url

    Current URL of the main frame.

    Declaration
    public string Url { get; }
    Property Value
    Type Description
    string
    View Source

    UserAgent

    Current user agent string of this view.

    Declaration
    public string UserAgent { get; set; }
    Property Value
    Type Description
    string

    Methods

    View Source

    AddJavaScriptMessageHandler(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
    bool

    'true' on success, otherwise 'false'.

    View Source

    CanGoBack()

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

    Declaration
    public bool CanGoBack()
    Returns
    Type Description
    bool

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

    View Source

    CanGoForward()

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

    Declaration
    public bool CanGoForward()
    Returns
    Type Description
    bool

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

    View Source

    CreateHandle(EvasObject)

    Creates a widget handle.

    Declaration
    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
    EvasObject.CreateHandle(EvasObject)
    View Source

    Eval(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.

    View Source

    EvalWithResult(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.

    View Source

    GetContext()

    Gets the context object of this view.

    Declaration
    public Context GetContext()
    Returns
    Type Description
    Context

    The context object of this view.

    View Source

    GetSettings()

    Gets the settings object of this view.

    Declaration
    public Settings GetSettings()
    Returns
    Type Description
    Settings

    The settings object of this view.

    View Source

    GoBack()

    Asks the main frame to navigate back in history.

    Declaration
    public void GoBack()
    View Source

    GoForward()

    Asks the main frame to navigate forward in history.

    Declaration
    public void GoForward()
    View Source

    LoadHtml(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.

    View Source

    LoadUrl(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.

    View Source

    Reload()

    Asks the main frame to reload the current document.

    Declaration
    public void Reload()
    View Source

    SetFocus(bool)

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

    Declaration
    public void SetFocus(bool focused)
    Parameters
    Type Name Description
    bool focused

    'true' to set the focus on the view, 'false' to remove the focus from the view.

    View Source

    StopLoading()

    Asks the main frame to stop loading.

    Declaration
    public void StopLoading()

    Events

    View Source

    LoadError

    Event that occurs when the load throws an error.

    Declaration
    public event EventHandler<SmartCallbackLoadErrorArgs> LoadError
    Event Type
    Type Description
    System.EventHandler<TEventArgs><SmartCallbackLoadErrorArgs>
    View Source

    LoadFinished

    Event that occurs when the load is finished.

    Declaration
    public event EventHandler LoadFinished
    Event Type
    Type Description
    System.EventHandler
    View Source

    LoadStarted

    Event that occurs when the load is started.

    Declaration
    public event EventHandler LoadStarted
    Event Type
    Type Description
    System.EventHandler
    View Source

    TitleChanged

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

    Declaration
    public event EventHandler<SmartCallbackArgs> TitleChanged
    Event Type
    Type Description
    System.EventHandler<TEventArgs><SmartCallbackArgs>
    View Source

    UrlChanged

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

    Declaration
    public event EventHandler<SmartCallbackArgs> UrlChanged
    Event Type
    Type Description
    System.EventHandler<TEventArgs><SmartCallbackArgs>

    Extension Methods

    RotaryEventExtensions.Activate(EvasObject)
    RotaryEventExtensions.AddRotaryEventHandler(EvasObject, RotaryEventHandler)
    RotaryEventExtensions.Deactivate(EvasObject)
    RotaryEventExtensions.RemoveRotaryEventHandler(EvasObject, RotaryEventHandler)
    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX