Screen object

From NSB App Studio
Revision as of 21:46, 3 December 2014 by Ghenne (talk | contribs) (Created page with "AppStudio programs run within a special version of a web browser. As a result, they can inherit a lot of the properties of the environment they run in. You can access these...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

AppStudio programs run within a special version of a web browser. As a result, they can inherit a lot of the properties of the environment they run in. You can access these properties from within your app.

It is not a complete list: there are additional items in the full HTML documentation. In addition, some browsers may have additional members not shown here.

screen object members

orientation Returns the current screen orientation
orientation.lock(val) val can be "landscape" or "portrait". Android only.

Example

If InStr(navigator.userAgent, "Chrome") Then
  screen.orientation.lock("landscape")
End If