Show
Ignore:
Timestamp:
10/09/08 00:24:16 (3 months ago)
Author:
tokuhirom
Message:

added elem.removeAttribute

Files:
1 modified

Legend:

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

    r21003 r21008  
    6363END 
    6464 
     65FUNCTION(removeAttribute) 
     66    ARG_COUNT(1); 
     67    ARG_str(name, 0); 
     68    EXTERNAL_NODE(); 
     69    xmlAttrPtr attr = domGetAttrNode(node, (const xmlChar*)*name); 
     70    if (attr) { 
     71        xmlUnlinkNode((xmlNodePtr)attr); 
     72    } 
     73    return Undefined(); 
     74END 
     75 
    6576FUNCTION(setAttributeNode) 
    6677    ARG_COUNT(1); 
     
    98109    BIND_IM("getAttribute",     getAttribute); 
    99110    BIND_IM("hasAttribute",     hasAttribute); 
     111    BIND_IM("removeAttribute",  removeAttribute); 
    100112    setupNodeIM(OBJECT_TEMPLATE); 
    101113    EXPORT_CLASS("Element"); 
    102114ENDSUBMODULE 
    103115 
    104 // REST: 6/24 
     116// REST: 7/24 
    105117// TODO: elem.setAttribute 
    106118// TODO: elem.setAttributeNS 
     
    108120// TODO: elem.getAttributeNode 
    109121// TODO: elem.getAttributeNodeNS 
    110 // TODO: elem.removeAttribute 
    111122// TODO: elem.removeAttributeNS 
    112123// TODO: elem.hasAttributeNS