This documentation is quite incomplete. At the moment, it is simply a holding place for various bits of documentation that don't have a proper home yet.
fluid.accumulate(list, fn, arg)
Scan through a list of objects, "accumulating" a value over them (may be a straightforward "sum" or some other chained computation). The results will be added to the initial value passed in by "arg" and returned.
Allocate an id to the supplied element if it has none already, by a simple scheme resulting in ids "fluid-id-nnnn" where nnnn is an increasing integer.
Return: String (representing the id)
Returns a DOM element quickly, given an id.
Return: Element or null if none exists
See also: fluid.jById
Clears an object or array of its contents. For objects, each property is deleted.
A special "marker object" which is recognized as one of the arguments to fluid.initSubComponents. This object is recognized by reference equality - where it is found, it is replaced in the actual argument position supplied to the specific subcomponent instance, with the particular options block for that instance attached to the overall "that" object.
See also: fluid.initSubComponents
Fetches a single container element and returns it as a jQuery.
Return: jQuery (a single-element jQuery of container)
Performs a deep copy (clone) of its argument
Return: Object (the copy)
Creates a new DOM Binder instance, used to locate elements in the DOM by name.
Retrieves and stores a component's default settings centrally.
Return: Object (If the object is passed in the argument, this is added to the store and then returned. If not, the current object in the store is returned)
Dumps a DOM element into a readily recognizable form for debugging - produces a "semi-selector" summarizing its tag name, class and id, whichever are set.
Return: String representing the DOM element
Construct a dummy or "placeholder" subcomponent, that optionally provides empty implementations for a set of methods.
Return: Object (the empty sub-component)
Constructs an "event firer" object which can be used to register and unregister listeners, to which "events" can be fired. These events consist of an arbitrary function signature.
Returns: Object (see below)
Expect that an output from the DOM binder has resulted in a non-empty set of results. If none are found this function will fail with a diagnostic message, with the supplied message prepended.
Causes an error message to be logged to the console and a real runtime error to be thrown.
fluid.find(list, fn, deflt)
Scan through a list of objects, terminating on and returning the first member which matches a predicate function.
Return: Object (the first object in the list that matches the predicate function, or deflt if nothing does)
Finds the nearest ancestor of the element that passes the test.
This function provides a generic way of instantiating and configuring any "sub-components" that may be a part of, or used by, a parent component. For example, this function is used by the Inline Edit component to instantiate the Undo decorator, a sub-component that provides Undo functionality to components that support it.
See also: fluid.COMPONENT_OPTIONS
fluid.initView(componentName, container, userOptions)
See also: fluid.byId
See also: fluid.findKeyInObject
See also: fluid.wrap
See also: fluid.unwrap
fluid.initComponents(that, className, args)
Cleanse the children of a DOM node by removing all <script> tags. This is necessary to prevent the possibility that these blocks are reevaluated if the node were reattached to the document.
Used to indicate that the DOM node has been stripped of all <script> tags
See also: fluid.dom.cleanseScripts
Returns the absolute position of a supplied DOM node in pixels. Implementation taken from quirksmode http://www.quirksmode.org/js/findpos.html
Returns the element text from the supplied DOM node as a single String.
Mockup of a missing DOM function
Inserts newChild as the next sibling of refChild.
Checks if the specified container is actually the parent of containee.
Determine if a node should be ignored by the iterator functions.
Determine whether a node's text content is entirely whitespace
fluid.dom.iterateDom(node, acceptor, allNodes)
Walks the DOM, applying the specified acceptor function to each element. There is a special case for the acceptor, allowing for quick deletion of elements and their children.
This is provided as a work around for IE's circular DOM issue. This is the default max DOM depth in IE.
Each Fluid component includes a standard options structure at its top-level. Options allow implementors to configure and customize a component. User-supplied options are merged with relevant defaults for the given components. These defaults registered by each component with the Fluid defaults management system via a call to
componentNameis a string name for the component, and
The options for each component (and their defaults) will vary, but all components share a subset of required defaults. These are:
selectors. Implementors can override the default selectors, so long as the selectors they provide meet the following requirements: