This function allows to set data
Name | Type | Description | |
---|---|---|---|
data |
Object
|
This parameter needs to be an object but it can hold nested values of any type. To use JSON data parse the data before you set it. |
|
source |
String
|
The source is a optional name to store the data. It defaults to the string "shared". |
Void
This function allows to get data
Name | Type | Description | |
---|---|---|---|
source |
String
|
Th is the name of the data you want to access. It defaults to the string "shared". |
Returns the object Hype Data Magic currently has stored under the given source name.
This function allows to refresh the data in the current scene
Name | Type | Description | |
---|---|---|---|
element |
HTMLDivElement
|
The element (including descendants) to refresh. This defaults to the scene element. |
Void
This function allows to refresh the data of all descendant of a given element
Name | Type | Description | |
---|---|---|---|
element |
HTMLDivElement
|
The element to start the descendants refresh. This defaults to the scene element. |
Void
This function allows to refresh a specific element
Name | Type | Description | |
---|---|---|---|
element |
HTMLDivElement
|
The element to refresh. |
Void
This function allows to disable observer based refresh calls when updating a data-magic-* attribute
Void
This function allows to (re)enable observer based refresh calls when updating a data-magic-* attribute
Void
This function is a simple helper function that checks if the content provided differs from the content found in element.innHTML and only refreshes if needed
Name | Type | Description | |
---|---|---|---|
content |
HTMLDivElement
|
The content to set in innerHTML if it differs |
Void