* \brief Retrieves an HTML attribute value by name. * * Looks up an attribute in the attributes map. Returns empty string if * the attribute doesn't exist. * * \param name The attribute name to retrieve. * \return The attribute value, or empty string if not found. */
| 137 | * \return The attribute value, or empty string if not found. |
| 138 | */ |
| 139 | std::string NODE::get_attribute(const std::string &name) const |
| 140 | { |
| 141 | try |
| 142 | { |
| 143 | return m_attributes.at(name); |
| 144 | } |
| 145 | catch (...) |
| 146 | { |
| 147 | return ""; |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | /** |
| 152 | * \brief Sets a CSS style property on this node. |
no outgoing calls