new MultimediaObject(type, name, data, style, attributes, events, animations)
Represents a MultimediaObject
Parameters:
| Name | Type | Description |
|---|---|---|
type |
object | string | a JSON representing the object or the DOM type of the MultimediaObject |
name |
string | the name of the MultimediaObject |
data |
object | an object representing the datas which can be internally used by the MultimediaObject |
style |
object | an object representing the CSS style of the MultimediaObject, applied at creation |
attributes |
object | an object representing the DOM attributes of the MultimediaObject, applied at creation to the DOM Element |
events |
object | an object representing the Events provided by the object. Supporting only DOM events for the moment. |
animations |
object | a second separated Object representing the MultimediaObject state over time. Each step contain an object with style values wich will be precompiled and applied over time. |
- Source:
Example
Instanciation
new MultimediaObject({
type: 'div',
style: {
position: 'absolute',
translateX: '10%'
},
attributes: {
id: 'multimediaObject',
'data-test': 'test',
},
events: {
click: function(event) {
console.log(this);
console.log(event);
};
}
});