Log Message:
-----------
Removed warning message when calling document.parent
Modified Files:
--------------
/cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/javascript/host:
HTMLElement.java
Revision Data
-------------
Index: HTMLElement.java
===================================================================
RCS file: /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/javascript/host/HTMLElement.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- HTMLElement.java 10 Jun 2003 11:56:59 -0000 1.12
+++ HTMLElement.java 16 Jul 2003 12:17:20 -0000 1.13
@@ -41,6 +41,7 @@
import com.gargoylesoftware.htmlunit.javascript.SimpleScriptable;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
+import org.apache.html.dom.HTMLDocumentImpl;
import org.mozilla.javascript.Scriptable;
/**
@@ -197,8 +198,10 @@
return null;
}
if ( ( parentXmlNode instanceof Element ) == false ) {
- getLog().warn( "Parent XML node is not an Element. Only Elements are currently supported. Parent class: "
- + parentXmlNode.getClass() );
+ if( parentXmlNode instanceof HTMLDocumentImpl == false ) {
+ throw new IllegalStateException( "Parent XML node is not an Element. Only Elements are currently supported. Parent class: "
+ + parentXmlNode.getClass() );
+ }
return null;
}
final Element parentXmlElement = (Element) parentXmlNode;
|