mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +00:00
LibWeb: Set an attribute's owning element when it is known
This commit is contained in:
parent
e01dfaac9a
commit
454d218716
3 changed files with 7 additions and 6 deletions
|
@ -9,15 +9,16 @@
|
|||
|
||||
namespace Web::DOM {
|
||||
|
||||
NonnullRefPtr<Attribute> Attribute::create(Document& document, FlyString local_name, String value)
|
||||
NonnullRefPtr<Attribute> Attribute::create(Document& document, FlyString local_name, String value, Element const* owner_element)
|
||||
{
|
||||
return adopt_ref(*new Attribute(document, move(local_name), move(value)));
|
||||
return adopt_ref(*new Attribute(document, move(local_name), move(value), owner_element));
|
||||
}
|
||||
|
||||
Attribute::Attribute(Document& document, FlyString local_name, String value)
|
||||
Attribute::Attribute(Document& document, FlyString local_name, String value, Element const* owner_element)
|
||||
: Node(document, NodeType::ATTRIBUTE_NODE)
|
||||
, m_qualified_name(move(local_name), {}, {})
|
||||
, m_value(move(value))
|
||||
, m_owner_element(owner_element)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue