FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
std::vector< ElementPtr > FB::DOM::Element::getElementsByTagName ( const std::string &  tagName) const

Gets a list of all elements in the document with the specified tag name.

tagNameName of the tag.
The elements by tag name.

Reimplemented in FB::ActiveX::AXDOM::Document, and FB::ActiveX::AXDOM::Element.

Definition at line 95 of file ScriptingCore/DOM/Element.cpp.

References FB::variant_list_of().

96 {
97  std::vector<FB::JSObjectPtr> tagList = callMethod<std::vector<FB::JSObjectPtr> >("getElementsByTagName", FB::variant_list_of(tagName));
98  std::vector<FB::JSObjectPtr>::iterator it;
99  std::vector<ElementPtr> outList;
100  for (it = tagList.begin(); it != tagList.end(); ++it)
101  {
102  outList.push_back(Element::create(*it));
103  }
104  return outList;
105 }
FB::detail::VariantListInserter variant_list_of(FB::variant v)
Allows convenient creation of an FB::VariantList.
Definition: variant_list.h:122
static ElementPtr create(const FB::JSObjectPtr &api)
Creates a FB::DOM::Element object from a JSObjectPtr representing a DOM object. This will probably th...

Here is the call graph for this function: