# webview Provides web support in a widget using webkit.
Inherits
object widget
Description
Provides an embedded web browser using webkit. Page structure can be managed by web element's unique identifiers.
Functions
`$load(<url:string>)`
Sets the current url for the webView and starts loading it
`$setHtml(<html_code:string>,[<baseurl:string>])`
Sets the content of the web view to the specified <html_code>. External objects such as stylesheets or images referenced in the HTML document are located relative to <baseurl>. The html is loaded immediately; external objects are loaded asynchronously.
`$findText(<txt:string>,[flag 1,flag 2,..;string])`
Finds the specified string, in the page, using the given options. Valid flags are:
     FindBackward        - Searches backwards instead of forwards; FindCaseSensitively    - Changes the behaviour to a case sensitive find operation. FindWrapsAroundDocument    - Restart from the beginning of the document if the end was reached and the text was not found. HighlightAllOccurrences    - Highlights all existing occurrences.
`<array> $frames()`
Returns an array containing the names of the document frames.
`appendWebViewActionToMenu(<menu:h_object>,<webview_action:string>,[<icon_identifier>])`
`<id:integer> $firstChild(<element_id:integer>)`
Return the identifier of element's first childr.
`<array> $findAll(<element_id:integer>,<query:string>)`
Searches for all the elements named <query> and stores them in an array of element's identifiers.
`<id:integer> $findFirst(<element_id:integer>,<query:string>)`
Searches for the first element named <query>; returns the identifier.
`<id:integer> $parentElement(<element_id:integer>,)`
Returns the parent of <element_id>.
`<id:integer> $nextSibling(<element_id>)`
Returns the element just after <element_id>.
`$appendInside(<element_id>,<html_code>)`
`$appendOutside(<element_id>,<html_code>)`
`<string> $elementTagName(<element_id>)`
Returns the tag name of the <element_id>.
`<id:integer> $getDocumentElement([frame_name:string])`
Return as unique identifier the document element of the frame [frame_name]. If no value has been specified for [frame_name], the main frame of the page will be used.
`string $attributeNames(<element_id>)`
Returns a comma-separated list of the attribute names set on element <element_id>.
`string $attribute(<element_id>,<name:string>)`
Returns the value of the attribute <name> for element <element_id>.
`setStyleProperty(<element_id>,<name:string>,<value:string>)`
Sets the value of the inline style on element <element_id> with the given name to <value> . In order to ensure that the value will be applied, you may have to append "!important" to the value.
`<value:string> styleProperty(<element_id>,<name:string>,<style_resolve_strategy:string>)`
Returns the value of the style with the given name using the specified strategy. If a style with name does not exist, an empty string is returned. Possible value for <style_resolve_strategy> are:
     CascadedStyle  - the property's value is determined using the rules defined in the document's stylesheet. This is the default strategy. InlineStyle    - the property's value is determined by element definetion, without respecting CSS rules. ComputedStyle  - the property's value is determined by the style property resolved from the environment.
`pixmap $makePreview()`
Returns a 212x142 thumbnail of the current webView contants. The returned object is an instance of the pixmap class.
`string $toPlainText(<element_id>)`
Returns the string representation of element <element_id>.
`string $setPlainText(<element_id>)`
Set the string representation of the element <element_id>.
`$setElementAttribute(<element_id>,<name:string>,<value:string>)`
Sets the attribute <name> with value <value> to the element <element_id>.
`$setWebSetting(<name:string>,<value:bool>)`
Enables or disables the <name> setting depending on <value>. Valid settings name: JavascriptEnabled, PluginsEnabled, JavascriptCanOpenWindows, JavascriptCanAccessClipboard, ZoomTextOnly, LocalContentCanAccessFileUrls.
`$removeFromDocument(<element_id>)`
Removes the element <element_id> from the document.
`$removeClass(<element_id>,<class_name:string>)`
Removes a class from the element <element_id>.
`string $classes(<element_id>)`
Returns a comma-separated list of classes set on the element <element_id>.
`$setLinkDelegationPolicy(<policy:string>)`
Sets the link delegation policy: what happens when the users click on a link. Valid values: DontDelegateLinks: No links are delegated. Instead, webView tries to handle them all. DelegateExternalLinks: When activating links that point to documents not stored on the local filesystem or an equivalent then $linkClickedEvent() is executed. DelegateAllLinks: Whenever a link is activated the $linkClickedEvent() is executed.
`$linkClickedEvent()`
This function can be called when the user clicks on a link, depending no the current link delegation policy. The argument of the function is the url that has been clicked. The default implementation emits the $linkclicked() signal.
`$loadStartedEvent()`
This function is called when the load of the page has started. The default implementation emits the $loadstarted() signal.
`$loadProgressEvent()`
This function can be called during the page load progress. The argument of the function is an int value that represent the loading progress status, ranging from 0 to 100. The default implementation emits the $loadprogress() signal.
`$loadFinishedEvent()`
This function is called when the load of the page has finished. The argument of the function is a bool value that is true if the page has been loaded successfully, false otherwise. The default implementation emits the $loadfinished() signal.
`$downloadRequestEvent()`
This function is called when the user tries to download a file. The argument of the function is the url of the file. You should return a valid path in the filesystem where to save the file. The default implementation emits the $downloadrequest() signal.
`$downloadProgressEvent()`
This function can be called during the download of a file. Three integer arguments are passed to this function: the number of downloaded bytes, the download id, the size of the remove file (if known). The default implementation emits the $downloadprogress() signal.
`$downloadCompletedEvent()`
This function can be called when a file download finishes. The argument of the function is the an integer value containing the download id. The default implementation emits the $downloadcompleted() signal.
Signals
`linkClicked()`
This signal is emitted by the default implementation of [classfnc:webview]linkClickedEvent[/classfnc]().
`loadStarted()`
This signal is emitted by the default implementation of [classfnc:webview]loadStartedEvent[/classfnc]().
`loadProgress()`
This signal is emitted by the default implementation of [classfnc:webview]loadProgressEvent[/classfnc]().
`loadFinished()`
This signal is emitted by the default implementation of [classfnc:webview]loadFinishedEvent[/classfnc]().
`downloadRequest()`
This signal is emitted by the default implementation of [classfnc:webview]downloadRequestEvent[/classfnc]().
`downloadProgress()`
This signal is emitted by the default implementation of [classfnc:webview]downloadProgressEvent[/classfnc]().
`downloadCompleted()`
This signal is emitted by the default implementation of [classfnc:webview]downloadCompletedEvent[/classfnc]().

Index, Object Classes

KVIrc 4.2.0.6190 Documentation
Generated by root at Wed Sep 25 16:57:30 2013