Changeset 21077

Show
Ignore:
Timestamp:
10/10/08 15:26:28 (3 months ago)
Author:
mattn
Message:

- createElement does not append child.
- emem's parentNode() is undefined. thus, parentNode().parentNode() will be error.

Location:
lang/cplusplus/llv8call/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/cplusplus/llv8call/trunk/ext/libxml/document.cc

    r21069 r21077  
    105105    xmlNodePtr node_raw = xmlNewNode(NULL, (const xmlChar*)*elname); 
    106106    assert(node_raw); 
    107     xmlAddChild(fragment, node_raw); 
    108107    return createObject( "Element", doc, node_raw ); 
    109108END 
     
    117116    xmlNodePtr node_raw = xmlNewCDataBlock(doc, (const xmlChar*)*elname, elname.length()); 
    118117    assert(node_raw); 
    119     xmlAddChild(fragment, node_raw); 
    120118    return createObject( "CDATASection", doc, node_raw ); 
    121119END 
  • lang/cplusplus/llv8call/trunk/t/070_libxml/02_dom.js

    r21069 r21077  
    9696    is(root.toString(),  '<foo><bar><eee/></bar></foo>', 'node.parentNode()'); 
    9797    is(eee.parentNode().nodeName(),   'bar',     'node.parentNode()'); 
    98     is(doc.createElement("emem").parentNode().parentNode(), undefined, 'node.parentNode()'); 
     98    is(doc.createElement("emem").parentNode(), undefined, 'node.parentNode()'); 
    9999}); 
    100100