Commit graph

2 commits

Author SHA1 Message Date
Mukilan Thiyagarajan
07b2ff5d60
script: use Element::create instead of DOM struct constructors (#39325)
Creating elements by directly calling their interface constructors leads
to some state not being intialized correctly (see #39285). It is also
not in line with the specifications as many of them refer to the
[`create an element`][1] algorithm when an element needs to be created,
which directly maps to `Element::create` in the script crate.

So, switch all such places where elements are created by script to use
`Element::create`.

[1]: https://dom.spec.whatwg.org/#concept-create-element

Testing: Existing WPT tests.

Fixes: #39285

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2025-09-16 09:26:42 +00:00
Ashwin Naren
c92cd9e624
script: Move HTML DOM interfaces to script/dom/html/ (#39046)
See #38901.

Testing: Refactor
Fixes: Partially #38901

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
2025-08-31 01:00:09 +00:00
Renamed from components/script/dom/htmldetailselement.rs (Browse further)