[Elements] are optional
Defined in
0.1/lib.js
Class SAPO
class
SAPO
Inclusion link: http://js.sapo.pt/SAPO/0.1/
Sample: http://js.sapo.pt/SAPO/sample/
Nested Class Summary
requires SAPO
SAPO Widget class : all widgets should be subclasses of this one
Function Summary
Extends the native Function object.
Creates a delegate (callback) that sets the scope to obj.
Call directly on any function.
Example:
Will create a function that is automatically scoped to this.
Example:
this.myFunction.bindObj(this) Will create a function that is automatically scoped to this.
Extends the native Function object.
Creates a delegate (callback) that sets the scope to obj.
Call directly on any function.
Example:
Will create a function that is automatically scoped to this.
Example:
this.myFunction.bindObjEvent(this) Will create a function that is automatically scoped to this.
Extends a given Object with a given set
of properties
Creates the SAPO namespace
Shortcut for document.getElementById
Function Details
function bindObj
Function
bindObj(Object
obj, [Array
args])
Extends the native Function object.
Creates a delegate (callback) that sets the scope to obj.
Call directly on any function.
Example:
Will create a function that is automatically scoped to this.
Example:
this.myFunction.bindObj(this) Will create a function that is automatically scoped to this.
Parameters:
obj
The object for which the scope is set
[args]
Overrides arguments for the call.
(Defaults to the arguments passed by the caller)
Returns:
The new function
function bindObjEvent
Function
bindObjEvent(Object
event, Object
obj, [Array
args])
Extends the native Function object.
Creates a delegate (callback) that sets the scope to obj.
Call directly on any function.
Example:
Will create a function that is automatically scoped to this.
Example:
this.myFunction.bindObjEvent(this) Will create a function that is automatically scoped to this.
Parameters:
event
The default event
obj
The object for which the scope is set
[args]
Overrides arguments for the call.
(Defaults to the arguments passed by the caller)
Returns:
The new function
function extendObj
Object
extendObj(Object
destination, Object
source)
Extends a given Object with a given set
of properties
Parameters:
destination
- The original objecty
source
- The new properties
Returns:
The extended object
function namespace
Object
namespace(string
ns)
Creates the SAPO namespace
Parameters:
ns
- namespace path
Returns:
Object with SAPO namespace
function s$
DOMElement|Array
s$(string|Array
elementID|ArrayOfIDs)
Shortcut for document.getElementById
Parameters:
elementID|ArrayOfIDs
Receives either an id or an
Array of id's
Returns:
Either the DOM element for the given id or an array of elements
for the given ids