Image Uploader Scripting API: CWebBrowser Class Reference

| Image Uploader Scripting API

Public Member Functions | List of all members
CWebBrowser Class Reference

## Public Member Functions

| addTrustedSite (string domain)
string | callJavaScriptFunction (string funcName, object args)
| close ()
HtmlDocument | document ()
bool | exec ()
string | getDocumentContents ()
int | getMajorVersion ()
| hide ()
bool | navigateToUrl (string url)
string | runJavaScript (string code)
| setFocus ()
bool | setHtml (string html)
| setOnFileInputFilledCallback (function callBack, object context)
| setOnLoadFinishedCallback (function callBack, object context)
| setOnNavigateErrorCallback (function callBack, object context)
| setOnTimerCallback (int timerInterval, function callBack, object context)
| setOnUrlChangedCallback (function callBack, object context)
| setSilent (bool silent)
| setTitle (string title)
| show ()
bool | showModal ()
string | title ()
string | url ()

## Detailed Description

Represents a web browser window. It is using Internet Explorer components on Windows, but is not implemented on other systems. Creating an instance: local webBrowser = CWebBrowser();

Since
  1.3.1.4270.

## Member Function Documentation

## ◆ close()

close | ( |  | ) |

Close the window. After call to this function, showModal() or exec() stops execution and returns true.

## ◆ exec()

bool exec | ( |  | ) |

Mostly the same as showModal but the window may be hidden and does not block parent window.

## ◆ getDocumentContents()

string getDocumentContents | ( |  | ) |

Returns current page contents.

## ◆ setOnFileInputFilledCallback()

setOnFileInputFilledCallback | ( | function | callBack,
|  | object | context
| ) |  |

Arguments passed to callback: data - a table containing:

{
browser = WebBrowser,
fileName = string
}

## ◆ setOnLoadFinishedCallback()

setOnLoadFinishedCallback | ( | function | callBack,
|  | object | context
| ) |  |

Arguments passed to callback: data - a table containing:

{
browser = WebBrowser,
url = string
}

## ◆ setOnNavigateErrorCallback()

setOnNavigateErrorCallback | ( | function | callBack,
|  | object | context
| ) |  |

Arguments passed to callback: data - a table containing:

{
browser = WebBrowser,
url = string,
statusCode = int
}

## ◆ setOnTimerCallback()

setOnTimerCallback | ( | int | timerInterval,
|  | function | callBack,
|  | object | context
| ) |  |

Arguments passed to callback: data - a table containing:

{
browser = WebBrowser,
}

## ◆ setOnUrlChangedCallback()

setOnUrlChangedCallback | ( | function | callBack,
|  | object | context
| ) |  |

Arguments passed to callback: data - a table containing:

{
browser = WebBrowser,
url = string
}

## ◆ showModal()

bool showModal | ( |  | ) |

Show the web browser window and wait until it is closed.

Returns
  true (if the window was closed programatically), false - if the window was closed by user.

## ◆ title()

string title | ( |  | ) |

Returns current page title or url if title is empty.

## ◆ url()

string url | ( |  | ) |

Returns current url.