Quickly retrieves an element, given its id.
||(Object) The id of the DOM node to find|
||(Document) (optional) The document in which it is to be found (if left empty, use the current document)|
|| if there are no elements with the given
This function works around a problem with calls to
document.getElementById() where sometimes, nodes with a name matching the
id will be returned. This function will throw an error with a descriptive message if that happens.
In this example,
fluid.byId() will return the node found with an
id attribute equal to "titleNode."