IWebView InterfaceAwesomium.NET 1.7.6Awesomium.NET
Represents a native Awesomium web-view instance. All managed web-view wrappers, implement this interface.

Namespace: Awesomium.Core
Assembly: Awesomium.Core (in Awesomium.Core.dll) Version: 1.7.6.0
Syntax

public interface IWebView : IDisposable, 
	IServiceProvider, ISynchronizeInvoke

The IWebView type exposes the following members.

Methods

  NameDescription
Public methodCancelLogin
This method should be called as the result of a user canceling a login dialog, when you are handling the LoginRequest event with NotModal (see Handled).
Public methodCancelPopupMenu
This method should be called as the result of a user canceling a drop-down (popup) menu, when you handle ShowPopupMenu yourself (see Handled).
Public methodCanGoBack
Gets if we can go back in history.
Public methodCanGoForward
Gets if we can go forward in history.
Public methodCopy
Performs a 'copy' operation using the system clipboard.
Public methodCopyHTML
Copies the HTML content currently selected in this view, to the system clipboard.
Public methodCopyImageAt
Attempt to copy an image on the page, to the system clipboard. This is meant to be used with ShowContextMenu.
Public methodCopyLinkAddress
Copies the target URL of the link currently under the cursor.
Public methodCreateGlobalJavascriptObject
Create a global JavaScript object that will persist between all loaded pages, for the lifetime of this IWebView instance.
Public methodCreateInspectorView(Boolean)
Requests the creation of a special Developer Tools Inspector View, that inspects the web contents of this view.
Public methodCreateInspectorView(WebSession, Boolean)
Requests the creation of a special Developer Tools Inspector View, that inspects the web contents of this view.
Public methodCreateJavascriptExecutionContext(JavascriptExecutionContextMethod)
Creates an asynchronous Javascript Execution Context and executes the method associated with it.
Public methodCreateJavascriptExecutionContextT(JavascriptExecutionContextMethodT, T)
Creates an asynchronous Javascript Execution Context and executes the method associated with it.
Public methodCut
Performs a 'cut' operation using the system clipboard.
Public methodDidChooseFiles
This method should be called as the result of a user selecting files in a file-chooser dialog, when you are handling the SelectLocalFiles event with NotModal (see Handled).
Public methodDidOverrideCertificateError
This method should be called if you want to ignore an SSL certificate error, when you are handling the CertificateError event with NotModal (see Handled).
Public methodExecuteJavascript(String)
Executes some JavaScript asynchronously in the main frame of the page.
Public methodExecuteJavascript(String, String)
Executes some JavaScript asynchronously on the page.
Public methodExecuteJavascriptWithResult(String)
Executes some JavaScript synchronously in the main frame of the page, and returns a result.
Public methodExecuteJavascriptWithResult(String, String)
Executes some JavaScript synchronously on the page, and returns a result.
Public methodFocusView
Gives the view the appearance of input focus.
Public methodGetInspectorView
Gets the Developer Tools Inspector view currently inspecting this view, if any.
Public methodGetLastError
Check if an error occurred during the last synchronous Javascript interoperation call.
Public methodGoBack
Navigates one step backwards in history.
Public methodGoForward
Navigates one step forward in history.
Public methodGoToHistoryOffset
Navigates back/forward in history via a relative offset.
Public methodGoToHome
Navigates to the Home URL as defined in HomeURL.
Public methodInjectKeyboardEvent
Passes a keyboard event to the view.
Public methodInjectMouseDown
Passes a mouse-down event to the view, using the last mouse-move coordinates.
Public methodInjectMouseMove
Passes a mouse-move event to the view.
Public methodInjectMouseUp
Passes a mouse-up event to the view, using the last mouse-move coordinates.
Public methodInjectMouseWheel
Passes a mouse-wheel event to the view.
Public methodInjectTouchEvent
Passes a multi-touch event to the view.
Public methodLoadHTML
Loads a string of HTML into the view asynchronously.
Public methodLogin
This method should be called as the result of a user supplying their credentials in a login dialog, when you are handling the LoginRequest event with NotModal (see Handled).
Public methodPaste
Performs a 'paste' operation using the system clipboard.
Public methodPasteAndMatchStyle
Performs a 'paste' operation using the system clipboard while attempting to preserve any styles of the original text.
Public methodPrintToFile
Prints this IWebView instance to a PDF file, asynchronously. You should generally use this method in response to a PrintRequest event.
Public methodRedo
Redo the last 'edit' operation. (Similar to CTRL+Y).
Public methodReduceMemoryUsage
Forces V8 to release as much memory as possible (collects garbage, dumps cached structures, etc) and also clears WebKit cache. This helps to reduce memory accumulated within the process associated with this view.
Public methodReload
Reloads the current page.
Public methodRequestPageInfo
Issues a request for the currently loaded page's security info. Information will be retrieved through the ShowPageInfo event.
Public methodResetZoom
Resets the zoom level for the currently loaded host.
Public methodResize
Resizes the view to certain pixel dimensions.
Public methodSaveImageAt
Attempt to download an image at the specified coordinates in the page. This is meant to be used with ShowContextMenu.
Public methodSelectAll
Performs a 'select all' operation.
Public methodSelectPopupMenuItem
This method should be called as the result of a user selecting an item in a drop-down (popup) menu, when you handle ShowPopupMenu yourself (see Handled).
Public methodStop
Stops the current navigation.
Public methodUndo
Undo the last 'edit' operation. (Similar to CTRL+Z).
Public methodUnfocusView
Remove the appearance of input focus.
Public methodZoomIn
Zooms into the page by 20%.
Public methodZoomOut
Zooms out the page by 20%.
Top
Properties

  NameDescription
Public propertyCreationTime
Indicates the date and time this IWebView instance was created. If the view has not been successfully initialized, this is MinValue.
Public propertyCurrentCertificateError
Gets the SSL certificate error (if any) reported for the page currently loaded. The default is None.
Public propertyCurrentNetError
Gets the network error (if any) reported for the page currently loaded. The default is OK.
Public propertyCustomErrorPage
Gets or sets the custom error page to load when a main frame has failed loading.
Public propertyFocusedElementType
Gets the type of the element currently focused in the loaded page.
Public propertyHasCertificateError
Gets if the page currently loaded has an SSL certificate error.
Public propertyHasInspectorView
Gets if this IWebView instance has an associated Developer Tools Inspector view currently active or pending wrapping.
Public propertyHasNetError
Gets if the main frame of the current page has failed to load with a network error.
Public propertyHasSelection
Gets if the user has selected content in the current page.
Public propertyHasTargetURL
Gets if the view is currently indicating a target URL, usually as a result of hovering over a link on the page.
Public propertyHasTitle
Gets if the currently loaded web-page has a title.
Public propertyHeight
Gets or sets the current height of the view.
Public propertyHTML
Gets the HTML code of the currently loaded document.
Public propertyIdentifier
Gets a unique global identifier for this IWebView instance.
Public propertyInstance
Gets the handle to the native web-view instance.
Public propertyIsCrashed
Gets if the process of this IWebView instance, has crashed.
Public propertyIsDocumentReady
Gets if the DOM (Document Object Model) for the page being loaded, is ready.
Public propertyIsFullscreen
Gets if an element in the currently loaded document, is in fullscreen mode.
Public propertyIsInspectorView
Gets if this is a special Inspector View displaying the Developer Tools for another IWebView instance.
Public propertyIsJavascriptEnabled
Gets if Javascript is enabled on this IWebView instance.
Public propertyCode exampleIsLive
Gets if the native web-view, is alive.
Public propertyIsLoading
Gets if any page resources are currently being loaded.
Public propertyIsNavigating
Gets if the view is currently navigating to a Url.
Public propertyIsPrinting
Gets if a printing operation is currently in progress.
Public propertyIsProcessCreated
Indicates if the child rendering process for this view, has been spawned.
Public propertyIsRendering
Gets or sets if internal asynchronous rendering is currently enabled.
Public propertyIsResponsive
Gets if the process of this IWebView instance, is currently responsive.
Public propertyIsSourceView
Gets if this is a source view that displays the source of loaded pages.
Public propertyIsTransparent
Gets or sets if pages should be rendered with transparency preserved (e.g., pages with style="background-color: transparent;")
Public propertyLatestContextData
Gets the latest web-view context data, usually updated by a right-click in page.
Public propertyNativeWindow
Gets the actual window handle that was created by this IWebView instance. This is only valid for windowed IWebView instances (see Window).
Public propertyNavigationInfo
Gets or sets the navigation info level.
Public propertyParentView
Gets the parent view (if any) of this IWebView instance.
Public propertyParentWindow
Gets or sets the parent window for this IWebView instance. This is only valid for windowed IWebView instances (see Window), on the Windows platform.
Public propertyPresenter
Gets or sets an IWebView presentation control that will receive requests for UI related events.
Public propertyProcessHandle
Gets the handle for the corresponding child-process hosting this IWebView instance.
Public propertyProcessId
Gets the identifier for the corresponding child-process hosting this IWebView instance.
Public propertyProcessInput
Gets or sets the user input that should be processed by a technology specific WebControl. The default is All.
Public propertyRenderProcess
Gets the rendering process associated with this IWebView instance. This represents the executing awesomium_process or the one specified through ChildProcessPath at WebCore initialization.
Public propertySelection
Gets a Selection providing information about the current selection range.
Public propertySource
Gets or sets the URL currently presented by this IWebView instance.
Public propertySurface
Gets or sets the ISurface instance currently assigned to the view.
Public propertySynchronousMessageTimeout
Gets or sets the maximum amount of time (in milliseconds) to wait for a response from a synchronous IPC message dispatched to the view's renderer process. Default is 800 (ms). Set this to 0 to use no timeout.
Public propertyTargetURL
Gets the target URL indicated by the web-view, usually as a result of hovering over a link on the page.
Public propertyTerminationStatus
Gets the termination status of this IWebView instance.
Public propertyTitle
Gets the title of the page currently loaded.
Public propertyToolTipText
Gets the tool-tip text currently indicated by the web-view, usually as a result of hovering over elements in the page.
Public propertyViewType
Gets the type of this IWebView instance.
Public propertyWebSession
Gets the session associated with this IWebView instance.
Public propertyWidth
Gets or sets the current width of the view.
Public propertyZoom
Gets or sets the Zoom percentage for the host currently loaded.
Top
Events

  NameDescription
Public eventAddressChanged
Occurs when the page URL has changed, usually after navigation to a new URL has started.
Public eventCertificateError
Occurs when an SSL certificate error is encountered while attempting to navigate to a new address.
Public eventConsoleMessage
Occurs when a message is added to the console on the page. This is usually the result of a JavaScript error being encountered on a page.
Public eventCrashed
Occurs when this view's process crashes.
Public eventCreateSurface
Occurs when an ISurface is requested by the view. Usually, every time the size of the view changes. You should return your own ISurface implementation here.
Public eventCreatingInspectorView
Occurs right after a call to either WebCore.CreateInspectorView or IWebView.CreateInspectorView and before the Inspector View is created. This allows inspected views set initialization parameters for the Inspector View.
Public eventCursorChanged
Occurs when the cursor has changed. This is is usually the result of hovering over different content.
Public eventDisposed
Occurs when an instance of IWebView has been disposed.
Public eventDocumentReady
Occurs when the DOM has finished parsing and the window object is available for JavaScript execution.
Public eventFocusChanged
Occurs when the focused element changes on the page. This is usually the result of text-box being focused or some other user-interaction event.
Public eventInitializeView
Occurs when the underlying web-view of a WebControlis about to be instantiated and wrapped or, for child views created in response to a ShowCreatedWebView, the native view assigned to the NativeView property of a WebControl, is about to be wrapped.
Public eventJavascriptMessage
Public eventJavascriptRequest
Occurs when a JavaScript client sends a management request through OSMJIF (such as minimize(Multiple), maximize(Multiple) etc.).
Public eventLoadingFrame
Occurs when the page begins loading a frame.
Public eventLoadingFrameComplete
Occurs when the page finishes loading a frame.
Public eventLoadingFrameFailed
Occurs when a frame fails to load. See ErrorDescription for additional information.
Public eventLoginRequest
Occurs when the page needs authentication from the user (for example, Basic HTTP Auth, NTLM Auth, etc.).
Public eventNativeViewInitialized
Occurs when the native underlying web-view of a WebControl, has been initialized.
Public eventPrintComplete
Occurs when a PrintToFile(String, PrintConfig) operation, completes successfully.
Public eventPrintFailed
Occurs when PrintToFile(String, PrintConfig) fails. Typically because of bad printer configuration or invalid output path (see PrintToFile(String, PrintConfig)).
Public eventPrinting
Occurs when a printing operation has started.
Public eventPrintRequest
Occurs when the page requests to print itself. (Usually the result of window.print() being called from JavaScript.) It is your responsibility to print the view to a file and handle the actual device printing.
Public eventProcessCreated
Occurs when the child rendering process for this view, has been spawned.
Public eventResponsiveChanged
Occurs when this view's process hangs, or becomes responsive after a hang. Use IsResponsive or IsResponsive to check the current state of the process.
Public eventSelectionChanged
Occurs when the selection in the current page, changes.
Public eventSelectionComplete
Occurs when selecting content in the current page, completes.
Public eventSelectLocalFiles
Occurs when the page requests to display a file chooser dialog. This is usually the result of a user clicking on an HTML input element with type='file'.
Public eventShowContextMenu
Occurs when the page requests to display a context menu. This is usually the result of a user right-clicking on an element or plugin in the page.
Public eventCode exampleShowCreatedWebView
Occurs when an IWebView creates a new child web-view instance (usually the result of window.open or an external link).
Public eventShowJavascriptDialog
Occurs when a JavaScript call that requires the creation of a modal dialog, is called.
Public eventShowPageInfo
Occurs in response to a RequestPageInfo call, requesting for the page's security related information.
Public eventShowPopupMenu
Occurs when the page requests to display a drop-down (popup) menu. This is usually the result of a user clicking on a select HTML input element.
Public eventTargetURLChanged
Occurs when the target URL has changed. This is usually the result of hovering over a link on a page.
Public eventTitleChanged
Occurs when the current page title has changed.
Public eventToggleFullscreen
Occurs asynchronously when JavaScript code in the page requests fullscreen mode for a particular element, using WebKit  Fullscreen API.
Public eventToolTipChanged
Occurs when the tooltip text has changed.
Public eventWindowClose
Occurs when Javascript in the page calls window.close.
Top
Remarks

IWebView exposes the full native web-view API, as well as .NET specific API added to web-views. It is provided for advanced coding and it allows you to override much of the .NET internal logic and call on the native web-view directly.
Note Note
Note that invoking members of the IWebView interface, will still not completely bypass .NET code. However, the IWebView interface provides a Instance property that allows you to p/invoke directly to the Awesomium native library (see DLLName). This can be used for even more advanced scenarios, when needed.
Caution note Caution
Awesomium.NET does not officially support calling to the Awesomium library directly (either using p/invoke or even through the IWebView interface). The Awesomium team will provide no support for any issues that may occur, from using these features.
Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also

Reference