Child pages
  • fluid.registerNamespace

Documentation for a historical release of Infusion: 1.4
Please view the Infusion Documentation site for the latest documentation, or the Infusion 1.3. Documentation for the previous release.
If you're looking for Fluid Project coordination, design, communication, etc, try the Fluid Project Wiki.

Skip to end of metadata
Go to start of metadata

fluid.registerNamespace(naimspace, env)

Ensures that an entry in the global namespace exists

fluid.registerNamespace(naimspace, env);

File name: Fluid.js


naimspace (String) The namespace to be registered.
env (Object) (optional) An environment in which to register the namespace. If not provided, the global fluid.environment will be used.

Return Value

Object The namespace object, either created or existing.


This function can be used to ensure that a namespace exists before adding functions to it. If the namespace already exists, it will be returned.


fluid.expander.makeDefaultFetchOptions = function (successdisposer, failid, options) {

This example registers the fluid.expander namespace before adding the makeDefaultFetchOptions() function to it.


var space = fluid.registerNamespace("fluid.engage.mccord");
space.testFunc = function() {

This example uses the returned namespace to define the function testFunc(). This function can then be invoked as fluid.engage.mccord.testFunc().

  • No labels