Âé¶¹Éç

Please turn on JavaScript. To find out how to do this visit the .

Simple assert methods.

This module is only included in debug versions of Glow.

Methods

assert

Checks that a condition is true.

Synopsis

glow.debug.assert(condition, message);

Parameters

condition
Type

The condition to check

message
Type

The error message to use if the condition is false.

[Optional further description after newline]

Example

// check that the first argument to a function was a glow.dom.NodeList
glow.debug.assert(aruments[0] instanceof glow.dom.NodeList, 'nodeList must be a glow.dom.NodeList');
assertParameterObject

Checks that a parameter object contains certain parameters.

Synopsis

glow.debug.assertParameterObject(parameters, required, optional, message);

Parameters

parameters
Type

The parameter object to check.

required
Type

The names of parameters that must be present.

optional
Type

The names of parameters that can be present.

message
Type

The error message to use (with more detailed information appended).

Example

// check that name is passed, and possibly email
glow.debug.assertParameterObect(arguments[0], ['name'], ['email'], 'invalid parameters to addUser');
Documentation generated by 2.1.0 on Mon Jul 06 2009 11:46:05 GMT+0100 (BST)

Âé¶¹Éç iD

Âé¶¹Éç navigation

Âé¶¹Éç © 2014 The Âé¶¹Éç is not responsible for the content of external sites. Read more.

This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.