A Secure Online Service from Utah.gov

Utah.gov

STAT 2.0

A Service from Utah.gov

STAT.*misc

stat.ready(callback)

Runs when document readyState === 'complete'

Example usage

stat.ready(myFunc)
stat.ready(function(){
	// Code...
})

stat.contextPath()

Gets the current app root folder path in case the context changes for endpoints

Example usage

var endpoint = stat.contextPath() + '/foo/'
returns: '/stat/foo/'

stat.isPage(pageTitle)

Check if the current page matches the supplied param [pageTitle]

Returns bool

Example usage

stat.isPage('STAT.*misc');
returns: true

stat.getUrlParam(param)

Gets the value of the supplied 'param'

Example usage [url: https://secure.office.uii/stat/?foo=bar]

stat.getUrlParam(foo)
returns: 'bar'

stat.el

Pre-selected elements available in the DOM

stat.el = {
	'header': document.querySelector('header'),
	'main': document.querySelector('main'),
	'article': document.querySelector('article'),
	'aside': document.querySelector('aside'),
	'footer': document.querySelector('footer')
};

Example

stat.el.main
returns: <main>