NidiumDocument

Document class.

It is not possible to create an instance of this class. 'global.document' is already available.

getCanvasById(id) (static)

Select an canvas element for further manipulation.

Arguments:
id (String)

Canvas identifier

Returns: Canvas | null

The selected element or null

getPasteBuffer(content) (static)

Get the content of the paste buffer.

Arguments:
content (String)

PasteBuffer text

getScreenData(element) (static)

Provides information about an canvas object.

Arguments:
element (Canvas)

Canvas instance

Returns: Object

dimensions

  • width (Integer): The width
  • height (Integer): The height
  • data (ArrayBuffer): The content

loadFont(name) (static)

Load a certain font.

Arguments:
name (String)

Fontname or font filename

Returns: Boolean

success

parse(ast) (static)

Parses a NML string and sets this as a document.

Arguments:
ast (String)

A NML string

Returns: NidiumDocument

A document instance

run(location) (static)

Run the application.

Arguments:
location (String)

Location

setPasteBuffer() (static)

Set the content of the paste buffer.

Returns: String

Paste buffer contents

showFPS(show=f) (static)

Display the number of frames per second.

Arguments:
show (Boolean)

Show it or hide it

stylesheet

  • Type: Object

The Native Style sheet (NSS) that belongs to this document.


Caught a mistake or want to contribute to the documentation? Edit this page on GitHub!