SuperCollider CLASSES

WebView

Web page display and browser
Inherits from: View : QObject : Object
Subclasses: QWebView

Description

WebView displays web pages and provides all the standard browsing functionality.

Class Methods

*clearCache

Clears all the memory caches, so that reloading a page is ensured to reload all the resources.

Inherited class methods

Undocumented class methods

*qtClass

Instance Methods

Navigation

-url

-url = address

Gets the current URL, or navigates to a new one.

-reload

Reloads the current page.

-back

Navigates to the previous page in history.

-forward

Navigates to the next page in history.

-findText (string, reverse: false)

Finds and selects the next instance of given text on the current page. When the given text changes, the search starts anew.

Arguments:

string

The text to find; a String.

reverse

Whether to search in reverse direction; a Boolean.

Data

-html

-html = htmlString

Gets or sets the displayed html content.

Arguments:

htmlString

A String.

-plainText

Tries to extract plain text from the displayed content, and returns it.

Returns:

A String.

-title

The title of the current page.

Returns:

A String.

-selectedText

The currently selected text.

Returns:

A String.

Behavior and appearance

-enterInterpretsSelection

-enterInterpretsSelection = bool

Whether pressing Ctrl+Return or Ctrl+Enter while some text is selected should evaluate the selection as SuperCollider code.

Arguments:

bool

A Boolean.

-setFontFamily (generic, specific)

Sets a specific font family to be used in place of a CSS-specified generic font family.

Arguments:

generic

The CSS generic font family to assign a font to; one of the following symbols: \standard, \fixed, \serif, \sansSerif, \cursive, \fantasy.

specific

A font family name to be assigned to the generic family; a String.

-editable

-editable = bool

Get or set whether the entire web page is editable.

Arguments:

bool

A Boolean.

Actions

-onLoadFinished

-onLoadFinished = func

Sets the object to be evaluated when a page has loaded successfully, passing the view as the argument.

-onLoadFailed

-onLoadFailed = func

Sets the object to be evaluated when a page has failed to load, passing the view as the argument.

-onLinkActivated

-onLinkActivated = func

Sets the object to be evaluated when the user triggers a link, passing the view and the URL of the link (as String) as the arguments.

When this is set to other than nil, WebView will stop handling links altogether. Setting this to nil will restore WebView link handling again.

-onReload

-onReload = func

Sets the object to be evaluated whenever a page reload is requested, passing the view and the URL to be reloaded (as String) as the arguments.

When this is set to other than nil, WebView will do nothing on reload requests. Setting this to nil will restore WebView reload handling again.

JavaScript

-evaluateJavaScript (script)

Evaluates the given JavaScript code in the context of the current page.

Arguments:

script

A String.

Inherited instance methods

Undocumented instance methods

-onJavaScriptMsg

-onJavaScriptMsg = func

-prLoadFinished (ok)