Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace lang

Index

Type aliases

BrowserDisplay

BrowserDisplay: { colorDepth: number; devicePixelRatio: number; docHeight: number; docScrollX: number; docScrollY: number; docViewHeight: number; docViewWidth: number; docWidth: number; docX: number; docY: number; pixelDepth: number; screenHeight: number; screenViewHeight: number; screenViewWidth: number; screenWidth: number; windowX: number; windowY: number }

browser display info

Type declaration

  • colorDepth: number

    Color depth of screen

  • devicePixelRatio: number

    Ratio of physical pixel resolution to CSS pixel resolution of display device

  • docHeight: number

    Document full height

  • docScrollX: number

    Scroll distance of document viewport in X coordinate

  • docScrollY: number

    Scroll distance of document viewport in Y coordinate

  • docViewHeight: number

    Document view height

  • docViewWidth: number

    Document view width

  • docWidth: number

    Document full width

  • docX: number

    X coordinate of document relative to window

  • docY: number

    Y coordinate of document relative to window

  • pixelDepth: number

    Pixel depth of screen

  • screenHeight: number

    Screen full height

  • screenViewHeight: number

    Screen view height

  • screenViewWidth: number

    Screen view width

  • screenWidth: number

    Screen full width

  • windowX: number

    X coordinate of browser window relative to screen

  • windowY: number

    Y coordinate of browser window relative to screen

Callback

Callback<T>: { args?: Array<any>; ctx?: any; fn: T }

A callback type in json format.

Type parameters

  • T

Type declaration

  • Optional args?: Array<any>
  • Optional ctx?: any
  • fn: T

Fallback

Fallback<T>: T | Callback<T>

A callback function or callback type in json format.

Type parameters

  • T

HardwareSupport

HardwareSupport: { logicalCPUCores: number }

Type declaration

  • logicalCPUCores: number

JsonObject

JsonObject<T>: {}

The JsonObject type is a JSON object containing zero or more key-value pairs.

Type parameters

  • T

Type declaration

  • [key: string]: T

PrimitiveType

PrimitiveType: null | undefined | string | number | boolean | String | Number | Boolean

The primitive type of JS language.

SystemInfo

SystemInfo: { browser: { name: string; version?: string }; cookieEnabled: boolean; device: { model: string; type: DeviceType; vendor: string }; display: BrowserDisplay; engine: { name: string; version: string }; hardware: { cpuCores: number; cpuName: string }; locale: Locale; online: boolean; os: { name: string; version?: string }; ua: string }

Runtime Env

Type declaration

  • browser: { name: string; version?: string }
    • name: string
    • Optional version?: string
  • cookieEnabled: boolean
  • device: { model: string; type: DeviceType; vendor: string }
    • model: string

      Determined dynamically

    • type: DeviceType
    • vendor: string

      Possible vendor: Acer, Alcatel, Amazon, Apple, Archos, Asus, BenQ, BlackBerry, Dell, GeeksPhone, Google, HP, HTC, Huawei, Jolla, Lenovo, LG, Meizu, Microsoft, Motorola, Nexian, Nintendo, Nokia, Nvidia, Ouya, Palm, Panasonic, Polytron, RIM, Samsung, Sharp, Siemens, Sony-Ericsson, Sprint, Xbox, ZTE

  • display: BrowserDisplay
  • engine: { name: string; version: string }
    • name: string
    • version: string
  • hardware: { cpuCores: number; cpuName: string }
    • cpuCores: number
    • cpuName: string
  • locale: Locale
  • online: boolean
  • os: { name: string; version?: string }
    • name: string
    • Optional version?: string
  • ua: string

ThreadPreload

ThreadPreload: string | string[]

Preload libraries before thread running.

ThreadRunner

ThreadRunner: { callMain: (fnName: string, ...args: any[]) => void; id: string; imports: (...urls: string[]) => void; onposted: (data: any) => void; postMain: (data: any) => void; terminate: () => void }

Thread runtime config

Type declaration

  • callMain: (fnName: string, ...args: any[]) => void

    Call method of thread class or function of ThreadRunner object in the current thread runing.

      • (fnName: string, ...args: any[]): void
      • Parameters

        • fnName: string
        • Rest ...args: any[]

        Returns void

  • id: string

    thread's id

  • imports: (...urls: string[]) => void

    library loading function

      • (...urls: string[]): void
      • Parameters

        • Rest ...urls: string[]

        Returns void

  • onposted: (data: any) => void

    Triggered when main ui thread post data to the current thread.

      • (data: any): void
      • Parameters

        • data: any

        Returns void

  • postMain: (data: any) => void

    Post data to main ui thread in the current thread running.

      • (data: any): void
      • Parameters

        • data: any

        Returns void

  • terminate: () => void

    Call when the current thread be terminated.

      • (): void
      • Returns void

Variables

Let F

F: Functions = Functions

Let SYS_URL

SYS_URL: any = null

Let T

T: Types = Types

Functions

Let _docSystem

Let _findSystem

  • _findSystem(): any
  • Returns any

Let _system

  • _system(srt: HTMLScriptElement): string
  • Parameters

    • srt: HTMLScriptElement

    Returns string