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 if OJI is not use 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. To enable OJI usage on win nt add -DJAVA_DOM_OJI_ENABLE to the DEFINES variable in makefile.win and also set an environment variable JAVA_DOM_OJI_ENABLE=true 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. 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