Class reference
Description
Implements a circular buffer.
Public methods
Method |
Details |
---|---|
|
Arguments:
Adds an arbitrary Javascript object to the buffer. The data object may be a simple type such as an integer or string or a more complex JavaScript structure such as an object or an array. If the buffer is full the least recently added object is removed. |
|
Clears the buffer. |
|
Arguments:
Gets an object from the buffer. |
|
Returns:
Gets the “newest” object in the buffer. This is the object added most recently. |
|
Returns:
Gets the “oldest” object in the buffer. This is the object added least recently. |
|
Returns:
Gets the object added before the most recent one. |
Description
Simple class allowing multiple values to be stored under one logical cookie name in the browser.
IMu.Cookie
objects are not usually created directly. Instead they get
created when IMu.Cookies.get()
is called.
New in version 2.0.
Public methods
Method |
Details |
---|---|
|
Removes this cookie from the cookie store. |
|
Saves the current set of values back to the browser's cookie store. |
Examples
-
Add a cookie called
Test
to the browser's store. TheTest
cookie will contain two values:alpha
andbeta
:var testCookie = IMu.Cookies.get('Test', {alpha: 1, beta: "two"});
testCookie.save(); -
Update the value of "beta" in the "Test" cookie.:
var testCookie = IMu.Cookies.get('Test', {alpha: 1, beta: "two"}); testCookie.values.beta = 'zwei';
testCookie.save();
Description
Static class providing access to IMu-specific cookies in the browser.
Each IMu-specific can have several values.
New in version 2.0.
Public methods
Method |
Details |
---|---|
|
Arguments:
Returns:
Checks for a cookie called If the cookie does not exist, a new one is created. |
Description
Class for IMu-specific exceptions.
Extends the standard JavaScript Error class.
Public methods
Method |
Details |
---|---|
|
Returns:
IMu.Error overrides the standard |
Description
Static class for formatting strings.
Public methods
Method |
Details |
---|---|
|
Arguments:
Returns:
Converts a JavaScript value to an appropriate string representation. |
|
Arguments:
Returns:
Replaces specifiers in the format argument with string representations of values passed as additional arguments. |
|
A synonym for the |
|
|
Description
Static class to simplify writing to the browser's JavaScript console.
Public methods
Method |
Details |
---|---|
|
Arguments:
Writes a message to the JavaScript console if available. The message is formatted using the |