ForgeDocumentation
en

Documentation

Global names of jComponent 20

jComponent 20 · jcomponent@20 referenceglobals Executed against Total.js 5

jComponent 20 exposes global functions and objects for state, components, requests and browser utilities. The bundle also includes jQuery. Use the table to find a name and its usage recipe.

NameKindWhat it doesRecipe
$functionjQuery.getting-started
$totaluidatefunctionInternal: the hour minus 12 from noon on ($totaluidate(13) is 1, $totaluidate(5) stays 5).data-helpers
$WobjectThe jQuery object of the window.dom-helpers
ADAPTfunctionReplaces the markers (~PATH~, ~ID~, CLASS) and translates the text of a component.find-and-call
AJAXfunctionAJAX('METHOD /url/', data, callback) makes a request to the server.ajax
APIfunctionCalls an ROUTE('API ...') endpoint of Total.js with a schema name and data.api-calls
APPEARANCEfunctionSets the color, the dark mode and the CSS variables of the page.dom-helpers
ASETTERfunctionReturns a function that calls SETTER() later.find-and-call
ATTRDfunctionReads a data- attribute of an element or an event.dom-helpers
BLOCKEDfunctionReturns false the first time and true during a time: a guard against repeated actions.state-shortcuts
CACHEfunctionStores a value in the browser for a period.storage-cache-pref-cookies
CACHEPATHfunctionKeeps a path of the state in the cache and restores it.state-shortcuts
CLfunctionLoads the code lists that are registered with CLINIT() and are not loaded yet.data-helpers
clearTimeout2functionCancels a timer of setTimeout2().state-shortcuts
CLINITfunctionRegisters a code list and the function that loads it.data-helpers
CLONEfunctionDeep copy of a value, dates included.state-shortcuts
CLRELOADfunctionLoads code lists again.data-helpers
CMDfunctionRuns a command of a component. Use the CMD of an instance or EXEC.commands
COMPILEfunctionThe same function as NOOP in jComponent 20.find-and-call
COMPONENTfunctionDeclares a component.custom-component
COMPONENTSfunctionThe ready components under a path.find-and-call
CONFIGfunctionChanges the configuration of components found by a selector.component-config
COOKIESobjectReads, writes and removes cookies.storage-cache-pref-cookies
COPYfunctionCopies the properties of an object into another one, deep.state-shortcuts
DAYSobjectThe names of the days of the week in English, from Sunday.data-helpers
DECRYPTfunctionReads a value made by ENCRYPT() with the same key and type.data-helpers
DEFobjectDefaults of jComponent. DEF.fallback is the address from which components that are not loaded are downloaded.
DIFFDOMfunctionMakes the children of an element the same as a new list without redrawing the ones that stay.dom-helpers
EMITfunctionEmits a global event.events
EMPTYARRAYobjectA frozen empty array.data-helpers
EMPTYOBJECTobjectA frozen empty object.data-helpers
ENCRYPTfunctionTurns a value into hexadecimal text with a check of the key (obfuscation, not security).data-helpers
ENVfunctionRegisters or reads a value of the page, used in URLs as [name].environment-variables
ENVIRONMENTfunctionSets the name of the application for the storage, the version and the language.dom-helpers
ERRORfunctionHelper to handle the validation errors of an API() answer.api-calls
ERRORSfunctionReturns the invalid components under a path.validation
EXEfunctionCalls a plugin method, a global function or a function of the state (the same as EXEC()).find-and-call
EXECfunctionCalls the method of a plugin (EXEC('plugin/method')) or a global function.commands
EXTENSIONfunctionAdds code to every instance of a component or plugin.extensions
FINDfunctionFinds a ready component by name, path or id.find-and-call
FLAGSfunctionDispatches custom path flags and invokes a callback.custom-flags
FNfunctionCompiles an expression into a function and remembers it.data-helpers
FREEfunctionRuns the cleanup of removed components at once.component-lifecycle
FUNCobjectAn object for functions that EXE('FUNC.name') can call.find-and-call
GETfunctionReads a value from a path of the state.state-api
GUIDfunctionReturns a random id.utilities
HASHfunctionReturns a numeric hash.utilities
HIDDENfunctionTrue when an element is not shown.dom-helpers
IMPORTfunctionLoads an HTML part, a script or a style from a URL.ui-import
INCfunctionAdds 1 (or the given number) to the number in a path.state-shortcuts
inDOMfunctionTrue while an element is in the document.dom-helpers
isIEbooleanTrue in Internet Explorer.dom-helpers
isMOBILEbooleanTrue on a mobile device.dom-helpers
isPRIVATEMODEbooleanTrue in a private window.dom-helpers
isROBOTbooleanTrue for a search engine robot.dom-helpers
isSTANDALONEbooleanTrue when the page runs as an installed application.dom-helpers
isTOUCHbooleanTrue on a device with touch.dom-helpers
jComponentobjectThe engine of jComponent: M.components, M.version...find-and-call
jQueryfunctionjQuery, bundled in the same file.getting-started
LOCALIZEfunctionLoads a dictionary in the format of the Total.js resource files.data-helpers
MobjectThe engine of jComponent (the same object as jComponent, Total and MAIN).find-and-call
MAINobjectThe engine of jComponent (the same object as jComponent, Total and M).find-and-call
MIDDLEWAREfunctionRegisters a function that runs before a route, or runs a list of them in order.find-and-call
MONTHSobjectThe names of the months in English.data-helpers
NAVobjectThe current location: url, query, params, and back()/forward().spa-routing
NEWUIBINDfunctionMakes a ui-bind on an element from the code.find-and-call
NODEINDEXOFfunctionThe position of an element among its siblings.dom-helpers
NODEINSERTfunctionMoves an element after or before another one.dom-helpers
NODEMOVEfunctionMoves an element one place down or up in its parent.dom-helpers
NOOPfunctionA function that does nothing.state-shortcuts
NOTFOCUSEDfunctionTrue when the browser tab is in the background.dom-helpers
NOWobjectA Date that jComponent keeps up to date.data-helpers
NULfunctionSets the value of a path to null (the same as NULL).state-shortcuts
NULLfunctionSets the value of a path to null.state-shortcuts
OFFfunctionRemoves listeners of a global event.events
ONfunctionRegisters a listener for a global event.events
PARSEfunctionParses JSON and turns date strings into dates.utilities
PIPEfunctionAPI() to the address in DEF.pipe.find-and-call
PLUGINfunctionDeclares a plugin.plugin
PLUGINSobjectThe plugins of the page by their path.find-and-call
PREFobjectUser preferences saved in the browser.storage-cache-pref-cookies
PUSHfunctionAdds a value to an array of the state and notifies.state-api
QUERIFYfunctionMakes a query string from an object, also after an address or a method.data-helpers
REDIRECTfunctionChanges the address without loading the page and runs the matching route.spa-routing
REPOobjectAn object of yours to share data between components.find-and-call
RESETfunctionClears the touched and modified states under a path.validation
ROUTEfunctionRegisters a client-side route.spa-routing
SCROLLBARfunctionWraps an element with a custom scrollbar.dom-helpers
SCROLLBARWIDTHfunctionThe width that a scrollbar takes.dom-helpers
SEEXfunctionCalls a function by name or sets a path.find-and-call
SETfunctionWrites a value at a path of the state and notifies everything bound to it.state-api
SETTERfunctionCalls a method of every component with a name, path or id.find-and-call
setTimeout2functionA debounced setTimeout() with an id and an optional limit of restarts.state-shortcuts
STRINGIFYfunctionJSON.stringify() that can compress empty values and choose the fields.data-helpers
STYLEfunctionAdds a style to the head; the same id replaces it.dom-helpers
TaobjectThe same object as Tangular, the template engine.data-helpers
TangularobjectThe template engine.ui-bind-templates
TAPIfunctionAPI() to the address in DEF.api.find-and-call
TEMPobjectAn object for temporary data.find-and-call
ThelpersobjectThe helpers of the templates (Tangular.helpers): add one with Thelpers.name = fn.data-helpers
TOGGLEfunctionChanges the boolean in a path.state-shortcuts
TotalobjectThe engine of jComponent (the same object as jComponent).find-and-call
TRANSLATEfunctionReplaces every @(text) with its translation.data-helpers
UNAUTHORIZEDfunctionTrue when window.user has none of the given permissions.data-helpers
UNWATCHfunctionRemoves the watchers of a path made with WATCH().state-shortcuts
UPDfunctionNotifies a path after you changed the object in place.state-api
UPDATEfunctionNotifies the components and the watchers of a path without changing it (alias UPD).state-shortcuts
UPLOADfunctionSends a FormData to a route with progress.upload
VISIBLEfunctionTrue when an element is in the visible part of the window.dom-helpers
WobjectThe window.find-and-call
WAITfunctionRuns a function when another one returns true or a path has a value; checks every 500 ms.state-shortcuts
WARNfunctionWrites to console.warn.state-shortcuts
WATCHfunctionRuns a function every time a path changes.state-api
WHnumberThe height of the window.dom-helpers
WIDTHfunctionThe size class of the width of an element or the window: xs, sm, md or lg.dom-helpers
WWnumberThe width of the window.dom-helpers
public/index.html
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<title>jComponent</title>
	<link rel="stylesheet" href="//cdn.componentator.com/spa.min@20.css" />
	<script src="//cdn.componentator.com/spa.min@20.js"></script>
</head>
<body>
	<p>The test lists the globals of this page.</p>
</body>
</html>