This documentation refers to the current trunk of the Infusion code and is being updated to reflect ongoing changes. As a result, it may contain information that is not relevant to the latest release, 1.4. For documentation related to v1.4 and earlier, please see the Infusion v1.4 Documentation
Skip to end of metadata
Go to start of metadata

fluid.registerNamespace(naimspace, env)

Ensures that an entry in the global namespace exists

File name: Fluid.js

Parameters

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.

See Also

  • [fluid.setGlobalValue]

Notes

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.

Example

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

Example

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

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.