Changeset 20882
- Timestamp:
- 10/07/08 09:32:10 (6 weeks ago)
- Location:
- lang/cplusplus/llv8call/trunk
- Files:
-
- 2 modified
-
ext/libxml/element.cc (modified) (3 diffs)
-
t/070_libxml/02_dom.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/cplusplus/llv8call/trunk/ext/libxml/element.cc
r20881 r20882 22 22 23 23 #include "node.h" 24 25 // doc.appendText('foo') 26 FUNCTION(appendText) 27 ARG_COUNT(1); 28 ARG_str(content, 0); 29 EXTERNAL_NODE(); 30 xmlNodeAddContent(node, (const xmlChar*)*content); 31 return Undefined(); 32 END 24 33 25 34 FUNCTION(setAttributeNode) … … 53 62 SUBMODULE(init_elem) 54 63 CLASS_WITH_CONSTRUCTOR(_new); 55 puts("HEM");56 64 BIND_IM("setAttributeNode", setAttributeNode); 65 BIND_IM("appendText", appendText); 66 BIND_IM("appendTextNode", appendText); // alias 57 67 setupNodeIM(OBJECT_TEMPLATE); 58 68 EXPORT_CLASS("Element"); 59 69 ENDSUBMODULE 60 70 61 // REST: 0/2471 // REST: 3/24 62 72 // TODO: elem.new 63 73 // TODO: elem.setAttribute … … 78 88 // TODO: elem.getElementsByLocalName 79 89 // TODO: elem.appendWellBalancedChunk 80 // TODO: elem.appendText81 // TODO: elem.appendTextNode82 90 // TODO: elem.appendTextChild 83 91 // TODO: elem.setNamespace -
lang/cplusplus/llv8call/trunk/t/070_libxml/02_dom.js
r20881 r20882 1 1 require('t/util.js'); 2 2 3 plan({tests:1 7});3 plan({tests:19}); 4 4 5 5 check_lib("org.coderepos.libxml"); … … 89 89 90 90 test(function () { 91 root.appendTextNode("AAAA"); 92 is(root.toString(), '<foo>AAAA</foo>', 'node.appendTextNode()'); 93 }); 94 95 test(function () { 91 96 root.setAttributeNode(doc.createAttribute("foo", "bar")); 92 97 is(root.toString(), '<foo foo="bar"/>', 'node.createAttribute()');
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)