Hi,
My site has compatibility problems with Opera/Safari. The following setup works in IE and FireFox, but not in Opera/Safari
The code below works in FF, IE and Opera/Safari (returns 'test'):
<div>
<e:handler event="DOMNodeInsertedIntoDocument" type="application/javascript">
<![CDATA[
bb.command.addClass(this,'test');
alert(this.viewNode.getAttribute('class'));
]]>
</e:handler>
TEST DIV
</div>
<e:handler event="DOMNodeInsertedIntoDocument" type="application/javascript">
<![CDATA[
bb.command.addClass(this,'test');
alert(this.viewNode.getAttribute('class'));
]]>
</e:handler>
TEST DIV
</div>
The code below works in FF, IE, but not in Opera/Safari (returns 'null'):
<my:testElm>
<e:handler event="DOMNodeInsertedIntoDocument" type="application/javascript">
<![CDATA[
bb.command.addClass(this,'test');
alert(this.viewNode.getAttribute('class'));
]]>
</e:handler>
TEST ELM
</my:testElm>
<e:handler event="DOMNodeInsertedIntoDocument" type="application/javascript">
<![CDATA[
bb.command.addClass(this,'test');
alert(this.viewNode.getAttribute('class'));
]]>
</e:handler>
TEST ELM
</my:testElm>
TDL custom element:
<d:element name="testElm" >
<d:template type="application/xml">
<div>
<d:content/>
</div>
</d:template>
</d:element>
<d:template type="application/xml">
<div>
<d:content/>
</div>
</d:template>
</d:element>
What's wrong with the custom element?

addClass to Custom component
23 July, 2008 - 15:46 — andysHi pdjong,
There is nothing wrong with the custom widget you have created. I copied pasted your code, and run it in Opera 9.2.7 and also Safari 3.1.
It works fine.
btw, I'm using backbase version 4.2.1 .
Which backbase version do you use? and which version of browsers did you test?
Andys