Interface AxDef
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
AxDef(target)
This class provides helper methods to define/decorate javascript object.
|
Method Summary
Interface Detail
AxDef(target)
This class provides helper methods to define/decorate javascript object.
use ax.def() to create an instance of this class.
- Parameters:
- {object} target
- (optional)
- See:
- ax.def
Method Detail
-
{AxDef} constant(name, value)define a constant property.
- Parameters:
- {string} name
- {*} value
- Returns:
- {AxDef}
-
{object} end()end of def.
- Returns:
- {object} a defined/decorated target object
-
{AxDef} method(name, func)define a method.
- Parameters:
- {string} name
- {function} func
- Returns:
- {AxDef}
-
{AxDef} mixin(obj)merge all properties(and methods) from another object.
- Parameters:
- {object} obj
- Returns:
- {AxDef}
-
{AxDef} ns(name, parent)define a namespace.
- Parameters:
- {string} name
- (period(.)-separated names)
- {object} parent
- (optional. default: "window")
- Returns:
- {AxDef}
-
{AxDef} property(name, getter, setter)define a read/write property.
- Parameters:
- {string} name
- {function} getter
- null for no getter
- {function} setter
- null for no setter
- Returns:
- {AxDef}
