BrightSign Object Reference Manual (FW 5.1) User Manual

Page 73

Advertising
background image

65

storage. Depending on database-specific attributes, you will only be able to set the size in units that are equal to
the page size of the database, which is established at creation. These storage units will occur only in the following
increments: 512, 1024, 2048, 4096, 8192, 16384, 32768.

FlushCachedResources() As Boolean: Discards any resources that WebKit has cached in memory.

SetLocalStorageDir(file_path As String): Specifies the directory that should be used for local storage
applications such as the JavaScript storage class (e.g. "SD:/localdb")

SetLocalStorageQuota(maximum As Integer): Sets the total size (in bytes) allotted to all local storage
applications. The default total size is 5MB.

SetWebDatabaseDir(file_path As String): Specifies the directory that should be used for web database
applications (e.g. "SD:/webdb"). This method must be called before using web database applications such as Web
SQL or IndexedDB.

SetWebDatabaseQuota(maximum As Integer): Sets the total size (in bytes) allotted to all web database
applications. The default total size is 5MB.

EnableJavaScript(enable As Boolean) As Boolean

AllowJavaScriptURLs

(url_collection As roAssociativeArray): Allows the specified JavaScript

BrightScript classes to be used by the specified URLs (all BrightScript classes in JavaScript are disabled by
default). This method accepts an associative array that maps JavaScript BrightScript classes to the URL(s) that are
allowed to use them.

o An all key indicates that all classes are authorized for the associated URL(s).
o An asterisk "*" value indicates that all URLs are authorized for the associated BrightScript class.
o A "local" value indicates that all local pages are authorized for the associated BrightScript class.

Example: The following will enable all BrightScript classes for all URLs.
html.AllowJavaScriptUrls({ all: "*" })

Example: The following will enable all BrightScript classes for local pages and the BrightSign homepage.
html.AllowJavaScriptUrls({ all: "local", "http://www.brightsign.biz" })

Advertising