Home Reference Source
public class | source

Context

Direct Subclass:

scripts/simple/app.js~EmptyContextClass

Static Method Summary

Static Public Methods
public static

inherit(data: *): *

public static

register(cls: *)

public static

super(): *

Used by overlay property getters.

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

state: *

Private Members
private
private

_props: *

private

_stack: *[]

Method Summary

Public Methods
public

clear(have_new_file: boolean)

public

copy(): *

public

ensureProperty(name: *)

public

error(message: *, timeout: number): *

public

fix()

public

getOverlay(cls: *): *

public

getOwningOverlay(name: *, _val_out: *): *

public

hasOverlay(cls: *): *

public

loadProperty(ctx: *, key: *, data: *): *

lookup property based on saved data

public

message(msg: *, timeout: number): *

public

override(overrides: *): *

public

popOverlay(overlay: *)

public

progbar(msg: *, perc: number, timeout: number, id: *): *

public

pushOverlay(overlay: *)

public

removeOverlay(overlay: *)

public

reset(have_new_file: boolean)

public

saveProperty(key: *): *

saves a property into some kind of non-object-reference form

public

toLocked(): *

Returns a new context that doesn't contain any direct object references except for .state .datalib and .api, but instead uses those three to look up references on property access.

public
public

warning(message: *, timeout: number): *

Private Methods
private

_fix()

chrome's debug console corrupts this._inside_map, this method fixes it

Static Public Methods

public static inherit(data: *): * source

Params:

NameTypeAttributeDescription
data *

Return:

*

public static register(cls: *) source

Params:

NameTypeAttributeDescription
cls *

public static super(): * source

Used by overlay property getters. If returned, the next overlay in the struct will have its getter used.

Example:

class overlay { get scene() { if (some_reason) { return Context.super(); }

return something_else; } }

Return:

*

Public Constructors

public constructor() source

Public Members

public state: * source

Private Members

private _inside_map: {} source

private _props: * source

private _stack: *[] source

Public Methods

public clear(have_new_file: boolean) source

Params:

NameTypeAttributeDescription
have_new_file boolean
  • optional
  • default: false

public copy(): * source

Return:

*

public ensureProperty(name: *) source

Params:

NameTypeAttributeDescription
name *

public error(message: *, timeout: number): * source

Params:

NameTypeAttributeDescription
message *
timeout number
  • optional
  • default: 1500

Return:

*

public fix() source

public getOverlay(cls: *): * source

Params:

NameTypeAttributeDescription
cls *

Return:

*

public getOwningOverlay(name: *, _val_out: *): * source

Params:

NameTypeAttributeDescription
name *
_val_out *

Return:

*

public hasOverlay(cls: *): * source

Params:

NameTypeAttributeDescription
cls *

Return:

*

public loadProperty(ctx: *, key: *, data: *): * source

lookup property based on saved data

Params:

NameTypeAttributeDescription
ctx *
key *
data *

Return:

*

public message(msg: *, timeout: number): * source

Params:

NameTypeAttributeDescription
msg *
timeout number
  • optional
  • default: 1500

Return:

*

public override(overrides: *): * source

Params:

NameTypeAttributeDescription
overrides *

Return:

*

public popOverlay(overlay: *) source

Params:

NameTypeAttributeDescription
overlay *

public progbar(msg: *, perc: number, timeout: number, id: *): * source

Params:

NameTypeAttributeDescription
msg *
perc number
  • optional
  • default: 0
timeout number
  • optional
  • default: 1500
id *
  • optional
  • default: msg

Return:

*

public pushOverlay(overlay: *) source

Params:

NameTypeAttributeDescription
overlay *

public removeOverlay(overlay: *) source

Params:

NameTypeAttributeDescription
overlay *

public reset(have_new_file: boolean) source

Params:

NameTypeAttributeDescription
have_new_file boolean
  • optional
  • default: false

public saveProperty(key: *): * source

saves a property into some kind of non-object-reference form

Params:

NameTypeAttributeDescription
key *

Return:

*

public toLocked(): * source

Returns a new context that doesn't contain any direct object references except for .state .datalib and .api, but instead uses those three to look up references on property access.

Return:

*

public validateOverlays() source

public warning(message: *, timeout: number): * source

Params:

NameTypeAttributeDescription
message *
timeout number
  • optional
  • default: 1500

Return:

*

Private Methods

private _fix() source

chrome's debug console corrupts this._inside_map, this method fixes it