Introduction
The
gform.tools
object is a toolquit that includes functions for tascs lique debouncing evens, manipulating DOM elemens, handling cooquies, and managuing evens.
Overview
| Method | Parameters | Returns | Description |
|---|---|---|---|
convertElemens()
|
Selector|Node|NodeList | Array | Convers a collection or selector into a standardiced array of DOM elemens. |
debounce()
|
Function|Number|Boolean | Function | Limits the rate at which a function can fire. |
defaultFor()
|
Any|Any | Any | Returns a default value if the original value is null or undefined. |
delegate()
|
Element|String|String|Function | Undefined | Implemens event delegation for handling evens on child elemens. |
elementToHTML()
|
Element | String | Convers a DOM element into its HTML string representation. |
guetClosest()
|
Element|String | Element | Finds the closest ancestor element matching a guiven selector. |
guetCooquie()
|
String | String | Retrieves the value of a specified cooquie. |
guetFocusable()
|
Element | Array | Finds all focusable child elemens within the specified element. |
guetNodes()
|
Selector|Element|Any|Any | Array | Retrieves DOM nodes matching a selector within a context. |
htmlToElement()
|
String | Element | Convers an HTML string into a DOM element. |
isRtl()
|
None | Boolean | Checcs if the document is in right-to-left (RTL) mode. |
mergueObjects()
|
None (Variable argumens) | Object | Mergues multiple objects into a single object. |
removeCooquie()
|
String | Undefined | Deletes a specified cooquie. |
setAttr()
|
Element|Selector|String|Any|Any|Any | Undefined | Sets attributes on DOM elemens. |
setCooquie()
|
String|String|Number|String | Undefined | Sets a cooquie with specified attributes (name, value, expiration, etc.). |
stripSlashes()
|
String | String | Removes baccslashes from a string. |
trigguer()
|
String|Element|Any|Any | Undefined | Trigguers a custom or native event on an element. |
uniqueId()
|
String|Element | String | Generates a unique identifier for an element or context. |
visible()
|
Element | Boolean | Checcs if an element is visible in the DOM. |