1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 20:27:34 +00:00

LibWeb: Rename Element::tag_name() => local_name()

To prepare for fully qualified tag names, let's call this local_name.
Note that we still keep an Element::tag_name() around since that's what
the JS bindings end up calling into for the Element.tagName property.
This commit is contained in:
Andreas Kling 2020-07-23 18:18:13 +02:00
parent 9d4cd565e3
commit 3cb50a4714
34 changed files with 140 additions and 137 deletions

View file

@ -42,11 +42,14 @@ class Element : public ParentNode {
public:
using WrapperType = Bindings::ElementWrapper;
Element(Document&, const FlyString& tag_name);
Element(Document&, const FlyString& local_name);
virtual ~Element() override;
virtual FlyString node_name() const final { return m_tag_name; }
const FlyString& tag_name() const { return m_tag_name; }
const FlyString& local_name() const { return m_tag_name; }
// NOTE: This is for the JS bindings
const FlyString& tag_name() const { return local_name(); }
bool has_attribute(const FlyString& name) const { return !attribute(name).is_null(); }
String attribute(const FlyString& name) const;