Changeset 21068 for lang/cplusplus/llv8call/trunk/ext/libxml/document.cc
- Timestamp:
- 10/10/08 08:36:03 (3 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/cplusplus/llv8call/trunk/ext/libxml/document.cc
r21003 r21068 175 175 xmlFree(result); 176 176 return str; 177 END 178 179 FUNCTION(getElementById) 180 ARG_COUNT(1); 181 ARG_str(id, 0); 182 EXTERNAL_DOC(); 183 xmlAttrPtr attr = xmlGetID(doc, (const xmlChar*)*id); 184 if (!attr) { 185 return Undefined(); 186 } else if (attr->type == XML_ATTRIBUTE_NODE) { 187 return CREATE_ATTR(doc, attr->parent); 188 } else if (attr->type == XML_ELEMENT_NODE) { 189 return createObject("Element", doc, (xmlNodePtr)attr); 190 } else { 191 return Undefined(); 192 } 177 193 END 178 194 … … 199 215 BIND_IM("createComment", createComment); 200 216 BIND_IM("toString", toString); 217 BIND_IM("getElementById", getElementById); 201 218 BIND_IM("close", _close); 202 219 INTERNALCOUNT(2);
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)