This function allows to set innerHTML in a save way. Meaning it helps in preventing undesired destruction of Hype managed nodes this is also set as the default decorator and registers as a callback
Name | Type | Description | |
---|---|---|---|
element |
HTMLDivElement
|
This is the element to set the content on |
|
value |
String
|
The value determins what is inserted to innerHTML |
Void
This function is a proxy to HypeDataDecorator.mapAttributeToSelector and and sets the attribute data-YOURKEY and maps it to the class .YOURKEY serving as a shortcut. The callback is optional and has setContent as fallback. The value of the data-YOURKEY will be forwarded to the callback(s) as event.value
Name | Type | Description | |
---|---|---|---|
key |
String
|
This is the data attribute we want to map |
|
callback |
String
|
This is an decorator callback and is optional |
|
options |
Object
|
These options are a mixin and still not used here |
Void
This function maps a attribute to selector and fires the given callback on all its decendants. This function allows for more flexebility in mapping. and the callback is optional and has setContent as fallback. The value of the attribute will be forwarded to the callback(s) as event.value
Name | Type | Description | |
---|---|---|---|
key |
String
|
This is the attribute we want to map |
|
selector |
String
|
This is the selector we want to forward the value to |
|
callback |
String
|
This is an decorator callback and is optional |
|
options |
Object
|
These options are a mixin and still not used here |
Void
This function allow to register a element decorator callback by name. Having named callbacks allows to chain them and reuse them if wanted.
Name | Type | Description | |
---|---|---|---|
name |
String
|
This is the attribute we want to map |
|
callback |
Function
|
This is the function to be registered as an decorator |
Void
This function maps sets up an HTML element observer that match a selector and a attribute. By default the style attribute on the HTML element is observered for change. To determine other attributes use the options as {attributesFilter: ['a','b']}. If one needs to listen to all attributes set options as {attributesFilter: []}
Name | Type | Description | |
---|---|---|---|
selector |
String
|
This is the selector that determin |
|
callback |
String
|
This is an decorator callback and is optional |
|
options |
Object
|
These options are a mixin and allow setting the attributeFilter |
Void
This function returns a list of all running observer. For testing might get removed.
Return array with active observer across all Hype documents