Skip to content

moxie.runtime.Runtime

Davit Barbakadze edited this page Aug 5, 2017 · 1 revision

Important! This page is auto-generated from the comments in the source files. All changes will be overwritten! If you are looking to contribute, modify the comment in the corresponding source file instead.

Module: moxie.runtime.Runtime

Table of Contents

Properties

Specifies whether runtime instance was initialized or not

Unique ID of the runtime

Runtime type (e.g. flash, html5, etc)

id of the DOM container for the runtime (if available)

Number of connected clients. If equal to zero, runtime can be destroyed

Runtime initialization options

order static

Default order to try different runtime types

Methods

Checks if the runtime has specific capability

Arguments

  • cap String
    Name of capability to check
  • [value] Mixed
    If passed, capability should somehow correlate to the value
  • [refCaps] Object
    Set of capabilities to check the specified cap against (defaults to internal set)

Returns container for the runtime as DOM element

Returns runtime as DOM element (if appropriate)

Destroys the runtime (removes all events and deletes DOM structures)

Register constructor for the Runtime of new (or perhaps modified) type

Arguments

  • type String
    Runtime type (e.g. flash, html5, etc)
  • construct Function
    Constructor for the Runtime type

getInfo(uid) static

Get info about the runtime (uid, type, capabilities)

Arguments

  • uid String
    Unique identifier of the runtime

Convert caps represented by a comma-separated string to the object representation.

Arguments

  • capStr String
    Comma-separated list of capabilities

Test the specified runtime for specific capabilities.

Arguments

  • type String
    Runtime type (e.g. flash, html5, etc)
  • caps String|Object
    Set of capabilities to check

Figure out a runtime that supports specified capabilities.

Arguments

  • caps String|Object
    Set of capabilities to check
  • [runtimeOrder] String
    Comma-separated list of runtimes to check against

Figure out an operational mode for the specified set of capabilities.

Arguments

  • modeCaps Object
    Set of capabilities that depend on particular runtime mode
  • [requiredCaps] Object
    Supplied set of capabilities to find operational mode for
  • [defaultMode='browser'] String|Boolean
    Default mode to use

Third party shims (Flash and Silverlight) require global event target against which they will fire their events. However when moxie is not loaded to global namespace, default event target is not accessible and we have to create artificial ones.

Events

Init

Dispatched when runtime is initialized and ready. Results in RuntimeInit on a connected component.

Error

Dispatched when runtime fails to initialize. Results in RuntimeError on a connected component.