Hi, I would like to see support for
document.createElement(...) and form.appendChild(...).
I would be willing to help with coding this functionality if
that woud help. This was initially opened under defect
730915 but I later realized that neither of these functions
are currently implemented in any form. Thanks,
-Barnaby
Logged In: YES
user_id=46756
Submitting patches would certainly help. Please refer to
http://htmlunit.sourceforge.net/submittingPatches.html
I work through bug reports and feature requests as fast as I
can with the available time but sometimes (like recently) I
don't have a lot of time to do that.
Logged In: YES
user_id=742109
I just commited this change to CVS for this RFE:
Partial fix for RFE 741930: Add createElement for elements
with 1-for-1 mapping from HTML tag names and DOM Level 0
classes. This excludes the input tags since the DOM Level 0
classes all map to a single HTML tag.
The change is to add a createElement method in HtmlPage.
To make this work, I added a document_ member that is set
when the page is initialized and can be accessed during
parsing through getDocument. This internal createElement
method is then made available to JavaScripts by adding
jsFunction_createElement to Document. A test case was
added for a simple case of creating a DIV element. This
partial fix was noted in the changes.xml file.
Checking in
src/java/com/gargoylesoftware/htmlunit/html/HtmlPage.java;
/cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlu
nit/html/HtmlPage.java,v <--
HtmlPage.java
new revision: 1.43; previous revision: 1.42
done
Checking in
src/java/com/gargoylesoftware/htmlunit/javascript/JavaScriptC
onfiguration.xml;
/cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlu
nit/javascript/JavaScriptConfiguration.xml,v <--
JavaScriptConfiguration.xml
new revision: 1.19; previous revision: 1.18
done
Checking in
src/java/com/gargoylesoftware/htmlunit/javascript/host/Docum
ent.java;
/cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlu
nit/javascript/host/Document.java,v <-- Document.java
new revision: 1.19; previous revision: 1.18
done
Checking in
src/test/java/com/gargoylesoftware/htmlunit/javascript/host/Do
cumentTest.java;
/cvsroot/htmlunit/htmlunit/src/test/java/com/gargoylesoftware/h
tmlunit/javascript/host/DocumentTest.java,v <--
DocumentTest.java
new revision: 1.8; previous revision: 1.7
done
Checking in src/xdocs/changes.xml;
/cvsroot/htmlunit/htmlunit/src/xdocs/changes.xml,v <--
changes.xml
new revision: 1.104; previous revision: 1.103
done
Logged In: YES
user_id=742109
Based on patch by Barnaby Court, added support for
appendChild to HTMLElement.
- added appendChild to config file.
- added jsFunction_appendChild to HTMLElement.
- added test case for appendChild
- added change to change log.
Checking in
src/java/com/gargoylesoftware/htmlunit/javascript/JavaScriptC
onfiguration.xml;
/cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlu
nit/javascript/JavaScriptConfiguration.xml,v <--
JavaScriptConfiguration.xml
new revision: 1.21; previous revision: 1.20
done
Checking in
src/java/com/gargoylesoftware/htmlunit/javascript/host/HTMLE
lement.java;
/cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlu
nit/javascript/host/HTMLElement.java,v <--
HTMLElement.java
new revision: 1.9; previous revision: 1.8
done
Checking in
src/test/java/com/gargoylesoftware/htmlunit/javascript/host/Do
cumentTest.java;
/cvsroot/htmlunit/htmlunit/src/test/java/com/gargoylesoftware/h
tmlunit/javascript/host/DocumentTest.java,v <--
DocumentTest.java
new revision: 1.9; previous revision: 1.8
done
Checking in src/xdocs/changes.xml;
/cvsroot/htmlunit/htmlunit/src/xdocs/changes.xml,v <--
changes.xml
new revision: 1.106; previous revision: 1.105
done
Logged In: YES
user_id=742109
With the separate work to support Input tags and the change
just made to support text nodes under RFE 805051, this RFE
can be closed.