Skip to content
maximebf edited this page Sep 14, 2010 · 1 revision

create

Fired after a namespace has been created

Properties:

  • identifier: the namespace identifier that has been created
Namespace.addEventListener('create', function(event) {
   alert(event.identifier);
});

use

Fired after a namespace element has been imported

Properties:

  • identifier: the namespace identifier that has been imported
Namespace.addEventListener('use', function(event) {
   alert(event.identifier);
});

include

Fired after a namespace has been included (before the callback is called when async).

Properties:

  • identifier: the namespace identifier
  • uri: the file uri
  • async: whether the file has been loaded asynchronously
  • callback: the callback to call on success
Namespace.addEventListener('include', function(event) {
   alert(event.identifier);
   alert(event.uri);
   alert(event.async);
   alert(event.callback);
});

includeError

Fired when include() fails to load the file (fired before the error callback is called when async).

Properties:

  • identifier: the namespace identifier
  • uri: the file uri
  • async: whether the file has been loaded asynchronously
  • callback: the callback to call on success
Namespace.addEventListener('include', function(event) {
   alert(event.identifier);
   alert(event.uri);
   alert(event.async);
   alert(event.callback);
});

provide

Fired when provide() is called.

Properties:

  • identifier: the namespace identifier
Namespace.addEventListener('provide', function(event) {
   alert(event.identifier);
});
Clone this wiki locally