Some of the CommonDOM functionality is broken with new design on all browsers. Behavior is correct with old plug-in e.g.
Document.getElementsByTagName("body") will throw following exception on IE
netscape.javascript.JSException: No such method or property "tagName" on JavaScript object
at sun.plugin2.main.client.MessagePassingJSObject.newJSException(Unknown Source)
at sun.plugin2.main.client.MessagePassingJSObject.waitForReply(Unknown Source)
at sun.plugin2.main.client.MessagePassingJSObject.doMemberOp(Unknown Source)
at sun.plugin2.main.client.MessagePassingJSObject.getMember(Unknown Source)
at sun.plugin.dom.DOMObject.getMember(Unknown Source)
at sun.plugin.dom.DOMObjectFactory.getRealClassByTagName(Unknown Source)
at sun.plugin.dom.DOMObjectFactory.createHTMLObject(Unknown Source)
at sun.plugin.dom.DOMObjectFactory.createHTMLObject(Unknown Source)
at sun.plugin.dom.html.HTMLDocument.getElementsByTagName(Unknown Source)
at CDOMCreateElemSimple$1.run(CDOMCreateElemSimple.java:40)
at sun.plugin.dom.DOMService.invokeAndWait(Unknown Source)
at CDOMCreateElemSimple.createNewElement(CDOMCreateElemSimple.java:32)
at CDOMCreateElemSimple.start(CDOMCreateElemSimple.java:18)
at sun.plugin2.applet.Applet2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
at CDOMCreateElemSimple$1.run(CDOMCreateElemSimple.java:40)
at sun.plugin.dom.DOMService.invokeAndWait(Unknown Source)
at CDOMCreateElemSimple.createNewElement(CDOMCreateElemSimple.java:32)
at CDOMCreateElemSimple.start(CDOMCreateElemSimple.java:18)
at sun.plugin2.applet.Applet2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
On Firefox3 it successfully inserts on element but inserting elements after the first insert fails subsequently.
Test Applet Link:
http://sqeweb.sfbay.sun.com/deployment2/jitu/plug-bug/CommonDOM/src/CDOMCreateElemSimple.html