Name

LzBrowser (as2) — Provides access to the browser and player environment

Synopsis

JavaScript: LzBrowser
Type: Object
Access: public
Runtimes: as2
Topic: LFC.Services
Declared in: WEB-INF/lps/lfc/services/platform/swf/LzBrowser.as

Description

The LzBrowser 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 13. Using LzBrowser to launch another browser

  <canvas height="140" debug="true">
    <!-- Load the Laszlo site in a new window -->
    <button onclick="LzBrowser.loadURL('http://www.laszlosystems.com/', '_blank')">
 
      Click me
    </button>
    <script>
      // List the player version
      Debug.write('Player version: ' + LzBrowser.getVersion());
    </script>
  </canvas>
 

Details

Static Properties (6)

defaultPortNums
static public var defaultPortNums = { ... };
__jscallback
static public var __jscallback = null;
__jscallq
static public var __jscallq;
__jslocked
static public var __jslocked = false;
parsedloadurl
static public var parsedloadurl = false;
postToLps
static public var postToLps = true;

Static Methods (22)

callJS()
static public function callJS(js : String, callback : Function);
Runs a Javascript method in the browser, optionally returning the result
callJSReturn()
static public function callJSReturn(a);
_dequeueJS()
static public function _dequeueJS(a);
getBaseURL()
static private function getBaseURL(secure, port);
Returns the base URL the lzx was loaded from
getInitArg()
static public function getInitArg(name) : String;
This function returns the value of a key in the request string that requested the the lzx app. This can be used to communicate server to an lzx app without forcing the app to make a request
getLoadURL()
static public function getLoadURL();
Returns the URL from which the application was loaded.
getLoadURLAsLzURL()
static public function getLoadURLAsLzURL();
Returns the loadUrl as a new LzURL
getVersion()
static public function getVersion();
Returns the current version of the Flash player.
isAAActive()
static public function isAAActive();
Determines if the a screen reader is active and the Flash player is focused
__jsready()
static public function __jsready();
_jsreset()
static public function _jsreset();
loadJS()
static public function loadJS(js : String, target : String);
Runs Javascript in the browser using a javascript: url, optionally in a target
loadURL()
static public function loadURL(url : String, target : String);
Loads a URL in the browser, optionally in a target
setClipboard()
static public function setClipboard(str : String);
Sets the system clipboard to the specified string
showMenu()
static private function showMenu(truefalse : Boolean);
Turns the flash context menu on or off
supportsPost()
static private function supportsPost();
toAbsoluteURL()
static private function toAbsoluteURL(url : String, secure : Boolean);
Converts relative URLs to absolute by prepending the load URL
updateAccessibility()
static private function updateAccessibility();
Updates accessibility data
urlEscape()
static public function urlEscape(str);
Escape a string using URL encoding.
urlUnescape()
static public function urlUnescape(str);
Escape a string using URL encoding.
usePost()
static private function usePost();
xmlEscape()
static public function xmlEscape(str);
Escape special characters in message: & and <.

JavaScript Synopsis

public var LzBrowser = { ... };