Set descendant's attribute's owner document in Node::adopt (#35076)

* Set descendant's attribute's owner document in Node::adopt

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Add test that adopting an element into a new doc updates the attribute' owner docs

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-01-20 00:06:28 +01:00 committed by GitHub
parent dabe162d44
commit c070372d1e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 38 additions and 7 deletions

View file

@ -160,6 +160,7 @@ use crate::task::TaskOnce;
// and when the element enters or leaves a browsing context container.
// https://html.spec.whatwg.org/multipage/#selector-focus
/// <https://dom.spec.whatwg.org/#element>
#[dom_struct]
pub(crate) struct Element {
node: Node,