Monster.DOM.Resource. Data

This class is used by the resource manager to embed data.

Constructor

new Data()

A Data Resource class

Since
  • 1.25.0
License
  • AGPLv3

Members

defaults

Properties
NameTypeDefaultDescription
modestringcors

https://developer.mozilla.org/en-US/docs/Web/API/fetch

credentialsstringsame-origin

https://developer.mozilla.org/en-US/docs/Web/API/fetch

typestringapplication/json

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#attr-type

Methods

(static) getURLAttribute() → {string}

Returns:
Type: 
string

connect() → {Monster.DOM.Resource}

This method appends the HTMLElement to the specified document

throws {Error} target not found

.

This method appends the HTMLElement to the specified document

throws {Error} target not found

Returns:
Type: 
Monster.DOM.Resource

create() → {Monster.DOM.Resource.Data}