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

added node.hasAttribute.

Files:
1 modified

Legend:

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

    r20991 r21003  
    5252END 
    5353 
     54FUNCTION(hasAttribute) 
     55    ARG_COUNT(1); 
     56    ARG_str(name, 0); 
     57    EXTERNAL_NODE(); 
     58    if (domGetAttrNode(node, (const xmlChar*)*name)) { 
     59        return True(); 
     60    } else { 
     61        return False(); 
     62    } 
     63END 
     64 
    5465FUNCTION(setAttributeNode) 
    5566    ARG_COUNT(1); 
     
    8697    BIND_IM("appendTextNode",   appendText); // alias 
    8798    BIND_IM("getAttribute",     getAttribute); 
     99    BIND_IM("hasAttribute",     hasAttribute); 
    88100    setupNodeIM(OBJECT_TEMPLATE); 
    89101    EXPORT_CLASS("Element"); 
    90102ENDSUBMODULE 
    91103 
    92 // REST: 3/24 
    93 // TODO: elem.new 
     104// REST: 6/24 
    94105// TODO: elem.setAttribute 
    95106// TODO: elem.setAttributeNS 
     
    99110// TODO: elem.removeAttribute 
    100111// TODO: elem.removeAttributeNS 
    101 // TODO: elem.hasAttribute 
    102112// TODO: elem.hasAttributeNS 
    103113// TODO: elem.getChildrenByTagName