Home Reference Source
public class | source

Dom

Extends:

AbstractService → Dom

Class that is going to deal with DOM parsing/manipulation.

Constructor Summary

Public Constructor
public

constructor(container: Object, serviceName: String)

Constructor.

Member Summary

Public Members
public

Full HTML String of the current page.

Method Summary

Public Methods
public

getContainer(element: HTMLElement | null): HTMLElement

Get the container on the current DOM, or from an HTMLElement passed via argument.

public

getNodeType(container: *): string

Return node type.

public

getWrapper(): HTMLElement

Get the main wrapper by the ID wrapperId.

public

parseContainer(element: HTMLElement): HTMLElement

Get container selector.

public

parseResponse(responseText: String): HTMLElement

Parse the responseText obtained from the ajax call.

public

putContainer(element: HTMLElement)

Put the container on the page.

public

Update body attributes.

public

Update page title.

Inherited Summary

From class AbstractService
public
public
public

checkDependencies(dependencies: *[])

public

getService(serviceName: *): *

public

hasService(serviceName: *): *

public

init()

Public Constructors

public constructor(container: Object, serviceName: String) source

Constructor.

Override:

AbstractService#constructor

Params:

NameTypeAttributeDescription
container Object
serviceName String

Public Members

public currentHTML: String source

Full HTML String of the current page. By default is the innerHTML of the initial loaded page.

Each time a new page is loaded, the value is the response of the ajax call.

Public Methods

public getContainer(element: HTMLElement | null): HTMLElement source

Get the container on the current DOM, or from an HTMLElement passed via argument.

Params:

NameTypeAttributeDescription
element HTMLElement | null

Return:

HTMLElement

public getNodeType(container: *): string source

Return node type.

Params:

NameTypeAttributeDescription
container *

Return:

string

public getWrapper(): HTMLElement source

Get the main wrapper by the ID wrapperId.

Return:

HTMLElement

element

public parseContainer(element: HTMLElement): HTMLElement source

Get container selector.

Params:

NameTypeAttributeDescription
element HTMLElement

Return:

HTMLElement

element

public parseResponse(responseText: String): HTMLElement source

Parse the responseText obtained from the ajax call.

Params:

NameTypeAttributeDescription
responseText String

Return:

HTMLElement

public putContainer(element: HTMLElement) source

Put the container on the page.

Params:

NameTypeAttributeDescription
element HTMLElement

public updateBodyAttributes(page: AbstractPage) source

Update body attributes.

Params:

NameTypeAttributeDescription
page AbstractPage

public updatePageTitle(page: AbstractPage) source

Update page title.

Params:

NameTypeAttributeDescription
page AbstractPage