Bunoon: TESS | Manual | Document

This area contains a set of functions that are used for handling and manipulating the base of the document, while offering support for other useful functions, such as being able to open a new window, which you can track. Also, as a bonus for hard-core Javascript developers, you can also easily import CSS/JS files from other locations easily, allowing eval scripts (possaility from AJAX data) to work perfectly.

Extra functions are also included for validation (which will be done automatically when trying to import files, to ensure that you don't try and duplicate code blocks).

Determines if the document is fully rendered or not.

The return value for this function is as follows:

  • [Boolean] - A boolean of true/false.

Below is an example of how to use this function:

var bIsReady = $T.Document.IsReady();

Tries to open a new window with a specific URL.

The main arguments for this function are as follows:

  • sURL [String] - The URL that should be used in the window.
  • bFocus [Boolean] - States if the window should be focused on.
  • sName [String] - Assigns a name to the window (so only one version of this window is open).
  • sSpecs [String] - The specifications about the new window (width, height, etc).
  • bReplace [Boolean] - States if this URL should replace the history of the current page.

The return value for this function is as follows:

  • [Object] - An object containing the window handle (or null if any error has occurred).

Below is an example of how to use this function:

var oNewWindow = $T.Document.NewWindow('http://www.google.com', true, 'Google');

Tries to import a JS file into the document head so that it can be used.

The main arguments for this function are as follows:

  • sFilename [String] - The filename that should be imported.

The return value for this function is as follows:

  • [Boolean] - A boolean of true/false to state of we have completed the operation.

Below is an example of how to use this function:

var bWasAdded = $T.Document.Import.JS('js/test.js');

Tries to import a CSS file into the document head so that it can be used.

The main arguments for this function are as follows:

  • sFilename [String] - The filename that should be imported.

The return value for this function is as follows:

  • [Boolean] - A boolean of true/false to state of we have completed the operation.

Below is an example of how to use this function:

var bWasAdded = $T.Document.Import.CSS('css/test.css');


The main arguments for this function are as follows:

  • sFilename [String] - The filename that should be removed.

The return value for this function is as follows:

  • [Boolean] - A boolean of true/false to state of we have completed the operation.

Below is an example of how to use this function:

var bWasRemoved = $T.Document.Import.Remove('js/test.js');

Tries to determine if a file is already imported into the document head.

The main arguments for this function are as follows:

  • sFilename [String] - The filename that should be checked.

The return value for this function is as follows:

  • [Boolean] - A boolean of true/false.

Below is an example of how to use this function:

var bExists = $T.Document.Import.Exists('js/test.js');