Screen

Overview

The Screen interface represents a screen, usually the one on which the current window is being rendered, and is obtained using window.screen.

Location

Required Methods


addEventListener

Registers an event handler of a specific event type on the EventTarget.

 

method addEventListener(partype: dynamic; parlistener: dynamic; paroptions: dynamic; parcapture: dynamic; paronce: dynamic; parpassive: dynamic)

 

void addEventListener(dynamic partype, dynamic parlistener, dynamic paroptions, dynamic parcapture, dynamic paronce, dynamic parpassive)

 

func addEventListener(_ partype: dynamic, _ parlistener: dynamic, _ paroptions: dynamic, _ parcapture: dynamic, _ paronce: dynamic, _ parpassive: dynamic)

 

void addEventListener(dynamic partype, dynamic parlistener, dynamic paroptions, dynamic parcapture, dynamic paronce, dynamic parpassive)

 

Sub addEventListener(partype As dynamic, parlistener As dynamic, paroptions As dynamic, parcapture As dynamic, paronce As dynamic, parpassive As dynamic)

Parameters:

  • partype:
  • parlistener:
  • paroptions:
  • parcapture:
  • paronce:
  • parpassive:

lockOrientation

Lock the screen orientation (only works in fullscreen or for installed apps)

 

method lockOrientation(parorientation: dynamic): Boolean

 

Boolean lockOrientation(dynamic parorientation)

 

func lockOrientation(_ parorientation: dynamic) -> Boolean

 

Boolean lockOrientation(dynamic parorientation)

 

Function lockOrientation(parorientation As dynamic) As Boolean

Parameters:

  • parorientation:

removeEventListener

Removes an event listener from the EventTarget.

 

method removeEventListener(partype: dynamic; parlistener: dynamic; paroptions: dynamic; paruseCapture: dynamic): dynamic

 

dynamic removeEventListener(dynamic partype, dynamic parlistener, dynamic paroptions, dynamic paruseCapture)

 

func removeEventListener(_ partype: dynamic, _ parlistener: dynamic, _ paroptions: dynamic, _ paruseCapture: dynamic) -> dynamic

 

dynamic removeEventListener(dynamic partype, dynamic parlistener, dynamic paroptions, dynamic paruseCapture)

 

Function removeEventListener(partype As dynamic, parlistener As dynamic, paroptions As dynamic, paruseCapture As dynamic) As dynamic

Parameters:

  • partype:
  • parlistener:
  • paroptions:
  • paruseCapture:

unlockOrientation

Unlock the screen orientation (only works in fullscreen or for installed apps)

 

method unlockOrientation: Boolean

 

Boolean unlockOrientation()

 

func unlockOrientation() -> Boolean

 

Boolean unlockOrientation()

 

Function unlockOrientation() As Boolean