lz.Browser is the single instance of the class
lz.BrowserService.
Interface to the browser via the runtime kernel
The lz.Browser service provides access to the browser and player environment.
It includes methods to load URLs in the browser, and check the version of the player. For example:
Example 31. Using lz.Browser to launch another browser
<canvas height="140" debug="true">
<!-- Load the Laszlo site in a new window -->
<button onclick="lz.Browser.loadURL('http://www.laszlosystems.com/', '_blank')">
Click me
</button>
<script>
// List the player version
Debug.write('Player version: ' + lz.Browser.getVersion());
</script>
</canvas>
| Name | Type (tag) | Type (js) | Default | Category |
|---|---|---|---|---|
LzBrowser
|
lz.BrowserService | readonly | ||
The browser service. Also available as the global
lz.Browser.
|
||||
Methods
| callJS() |
|---|
| Parameter Name | Type | Description |
|---|---|---|
| methodname | String | Browser javascript method name to execute |
| callback | Function | Optional callback function to receive the return value of the javascript call |
| args |
| getAppID() |
|---|
| getInitArg() |
|---|
| getLoadURL() |
|---|
| getLoadURLAsLzURL() |
|---|
| getOS() |
|---|
| getVersion() |
|---|
| isAAActive() |
|---|
| loadJS() |
|---|
| Parameter Name | Type | Description |
|---|---|---|
| js | String | Javascript string to execute |
| target | String | Optionally specifies a named frame to display the contents of the URL. By default, the javascript specified in 'js' is executed in the current browser frame . |
| loadURL() |
|---|
| Parameter Name | Type | Description |
|---|---|---|
| url | String | URL to load |
| target | String | Optionally specifies a named frame to display the contents of the URL. The document specified by URL is loaded into the current browser frame by default. |
| features |
| makeProxiedURL() |
|---|
| setClipboard() |
|---|
| showMenu() |
|---|
| urlEscape() |
|---|
![]() |
This method is deprecated |
|---|---|
| Use encodeURIComponent(string) instead. |
| urlUnescape() |
|---|
| xmlEscape() |
|---|
Copyright © 2002-2008 Laszlo Systems, Inc. All Rights Reserved. Unauthorized use, duplication or distribution is strictly prohibited. This is the proprietary information of Laszlo Systems, Inc. Use is subject to license terms.