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 until OJI is used to obtain JNIEnv one has to apply two patches webshell/src/nsWebShell.cpp.patch java/dom/jni/DocumentImpl.java.patch The first one inits nsJavaDOM component and starts jvm. The second one registers a document load listener via DOMAccessor. Note: any class that implements the DocumentLoadListener interface may stand for TestDocLoadListener. See the section on Building for instructions on how to apply the patches. 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