SC.loadPackage({ 'EmbedElement': {
comment: 'I define an embed element, for including foreign resources with so-called "embed codes".',
traits: [ 'Element' ],
sharedProperties: {
protoHTML: { initValue: '
'
+'\t
</>
Replace this with embedded code.
'
+'
' },
applicableWidgets: { initValue: [ 'WidgetBackgroundColor', 'WidgetBorderColor', 'WidgetBorder', 'WidgetBorderRadius', 'WidgetPadding', 'WidgetOpacity' ] },
creationMenuItem: { initValue: '' }
},
properties: {
},
methods: {
init: {
comment: 'I initalize a new EmbedElement for the DOM node given to me as argument.',
code: function(aNode){
this.delegate('Element', 'init', aNode);
// Custom initialisation here
}
}
}
}});