Using the Java DOM API ---------------------- A Java component obtains a org.w3c.dom.Document by registering for Document load notifications. The Document is passed in along with the notifications. The preferred way for a Java component to register for Document load notifications is to register via the DOMAccessor class. However, currently this does not work and one has to apply a patch to webshell/src/nsWebShell.cpp. See the section on Building for instructions on how to apply the patch. The nsJavaDOM component by means of this patch registers itself as a DocumentLoadObserver with the DocumentLoader service. It then loads a class called DOMFactory, asks it for a Java DocumentLoadListener and starts sending all document load notifications that it recieves to the Java listener. So the first place to start hacking would be DOMFactory.java. Makefiles --------- You may have to set DEPTH to point to the mozilla CVS workspace root in Makefile and jni/Makefile. SInce this stuff is not part of the regular SeaMonkeyBuild, Makefiles are not generated from Makefile.in, so just go ahead and hack the Makefile. That is also why I have a separate Makefile.linux for Linux. (Does not work with Linux... last time I checked, the Blackdown JDK had a problem creating the JVM in nsJavaDOMImpl.cpp::Initialize:CreateJavaVM). Building -------- After having done a configure at the top level of SeaMonkey, do a make in the dom and the dom/jni directories. This will copy over a few header files that are needed by the patch to nsWebShell. You can then apply the patch to nsWebShell.cpp by executing `patch nsWebShell.cpp