Assembler

Monster.DOM. Assembler

you can call the method via the monster namespace new Monster.DOM.Assembler().

<script type="module">
import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
console.log(new Monster.DOM.Assembler())
</script>

Alternatively, you can also integrate this function individually.

<script type="module">
import {Assembler} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/dom/assembler.js';
console.log(new Assembler())
</script>

Constructor

# new Assembler(fragment)

Allows you to build an html fragment

Parameters:
Name Type Description
fragment DocumentFragment
Since:
  • 1.6.0
Throws:
  • value is not an instance of

    Type
    TypeError
  • value is not a function

    Type
    TypeError
  • the function is not defined

    Type
    Error

Methods

# createDocumentFragment(data) → {DocumentFragment}

Parameters:
Name Type Description
data ProxyObserver | undefined
Throws:

value is not an instance of

Type
TypeError
Returns:
Type
DocumentFragment

# getAttributePrefix() → {string}

Returns:
Type
string

# setAttributePrefix(prefix) → {Assembler}

Parameters:
Name Type Description
prefix string
Throws:

value is not a string

Type
TypeError
Returns:
Type
Assembler