GlideDocumentV3 - Client

The GlideDocument class provides the ability to search a DOM element, a document, or a JQuery element.

The GlideDocumentV3 API can be used in client-side scripts using ListV2 and ListV3 APIs. The GlideDocument APIs are accessed using the g_document global object.

GlideDocumentV3 - getElement(String selector, Element context)

Returns a node found in the specified DOM based context or created from the HTML context.

Table 1. Parameters
Name Type Description
selector String or Object The selector expression
context String or Object (Optional) A DOM Element, document, or JQuery object to be searched.
Table 2. Returns
Type Description
node The node that matches the selector.

GlideDocumentV3 - getElements(String selector, Element context)

Returns a node list found in the specified DOM based context or created if an HTML context is specified.

Table 3. Parameters
Name Type Description
selector String or Object The selector expression
context String or Object (Optional) A DOM Element, document, or JQuery object to be searched.
Table 4. Returns
Type Description
node list A list of nodes that matches the selector.