Home Manual Reference Source Test Repository
public class | source

DocumentRef

Provides access to the HTML document.

Static Member Summary

Static Public Members
public static get

The class decorators.

public static get

The constructor parameters.

Constructor Summary

Public Constructor
public

constructor(document: HTMLDocument)

Initializes a new instance of the class.

Member Summary

Public Members
public get

The application name.

public get

The name of the token used to prevent CSRF.

public get

The token used to perform CSRF validation.

public get

A value indicating whether the current document is the 404 error handler.

public get

The language that the page is written in.

public set

language(value: string): *

Sets the language that the page is written in.

public get

nativeDocument: HTMLDocument

The underlying HTML document.

Method Summary

Public Methods
public

async appendScript(id: string, src: string, toBody: boolean): Promise

Appends a JavaScript file to the document.

Static Public Members

public static get annotations: Array source

The class decorators.

public static get parameters: Array source

The constructor parameters.

Public Constructors

public constructor(document: HTMLDocument) source

Initializes a new instance of the class.

Params:

NameTypeAttributeDescription
document HTMLDocument

The underlying HTML document.

Public Members

public get applicationName: string source

The application name.

public get csrfParam: string source

The name of the token used to prevent CSRF.

public get csrfToken: string source

The token used to perform CSRF validation.

public get isNotFoundHandler: boolean source

A value indicating whether the current document is the 404 error handler.

public get language: string source

The language that the page is written in.

public set language(value: string): * source

Sets the language that the page is written in.

public get nativeDocument: HTMLDocument source

The underlying HTML document.

Public Methods

public async appendScript(id: string, src: string, toBody: boolean): Promise source

Appends a JavaScript file to the document.

Params:

NameTypeAttributeDescription
id string

The identifier of the script to be appended.

src string

The URI of the external resource to be loaded.

toBody boolean
  • optional

Value indicating whether to append the script to the body, instead of the head.

Return:

Promise

Completes when the script has been loaded.