Monster.DOM. Resource

In this namespace you will find classes and methods for handling resources.

Author
  • schukai GmbH

Classes

Data

A Data Resource class

Link

A Resource class

Script

A Resource class

Stylesheet

A Resource class

Namespaces

Link

In this namespace you will find classes and methods for links

.

Members

defaults

Properties
NameTypeDescription
documentDocument

the document object into which the node is to be appended

src/hrefstring

url to the corresponding resource

querystring

defines the location where the resource is to be hooked into the dom.

idstring

element attribute id

titlestring

element attribute title

classstring

element attribute class

timeoutint

timeout

Methods

(static) getURLAttribute() → {string}

Returns:
Type: 
string

available() → {Promise}

With available() you can check if a resource is available.

With available() you can check if a resource is available. This is the case when the tag is included and the resource is loaded.

Returns:
Type: 
Promise

connect() → {Monster.DOM.Resource}

This method appends the HTMLElement to the specified document.

This method appends the HTMLElement to the specified document. If the element has not yet been created, create() is called implicitly.

throws {Error} target not found

Returns:
Type: 
Monster.DOM.Resource

create() → {Monster.DOM.Resource}

This method is overridden by the special classes and creates the DOM object.

This method is overridden by the special classes and creates the DOM object. This method is also called implicitly, if not yet done explicitly, by calling connect().

Throws:

this method must be implemented by derived classes

Type
Error
Returns:
Type: 
Monster.DOM.Resource

isConnected() → {boolean}

Returns:
Type: 
boolean