Skip to content
Henrik Vendelbo edited this page Apr 30, 2014 · 3 revisions

An enhance page is a self contained HTML DOM Document with a resolver. In scripts you can access it using Resolver("document"). The enhanced features of the document are maintained under essential. You will normally not need to access these.

The page can be configured using tags in the HTML.

Tag Use
<meta name="lang cookie" ..>
<meta name="text selection" ..>
<meta name="enhanced roles" ..>
<link rel="subresource" ..>
<script type="application/config">
<script type="application/init">
<.. role=.. data-role=..>

Is a document enhanced? test document.essential not undefined.

API on document.essential

As functionality matures it is move to Generator, Resolver and the HTML markup. Expect major releases to obsolete some of the API as the functionality is directly available.

Other pieces are shims to make older browsers work better E.G. MutableEvent.

essential.<Thingy>
DescriptorQuery
DialogAction
ElementPlacement
EnhancedContext
HTMLElement
HTMLScriptElement
HTMLImplementation
JSON2Attr
Layouter, Laidout
MutableEvent
StringType, ObjectType, NumberType, BooleanType, ArrayType, DateType, Type
activateArea Change the active area for the page overall. Use for navigation
getActiveArea
callCleaners Call cleaners registered for an element.
cleanRecursively Call cleaners for the element and all descendants.
console Function that returns a console object if dev tools are present, or a stub. Supports multiple parameters in IE.
fireAction
isFileProtocol
serverMode
openWindow Open an enhanced browser window that is managed by EssentialJS
openSidebar Open an enhanced IFRAME in the body that is managed by EssentialJS
updateOnlineStatus
translate i18n translation of tokens and text
htmlEscape Escape a string for HTML use.
createHTMLDocument, importHTMLDocument Make a document object separately or for inclusion in the page body.

Clone this wiki locally