aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmltablesectionelement.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2023-05-28 22:43:55 -0400
committerJosh Matthews <josh@joshmatthews.net>2023-05-28 23:23:12 -0400
commitdbff26bce05d404027ef5bbfd85fb5995e4726bc (patch)
tree6ebb631eef396c2f387fe8269b0d59bde0dccae2 /components/script/dom/htmltablesectionelement.rs
parentd9600ff50f3c1bdd8c44e2dfc15a18416d80cb82 (diff)
downloadservo-dbff26bce05d404027ef5bbfd85fb5995e4726bc.tar.gz
servo-dbff26bce05d404027ef5bbfd85fb5995e4726bc.zip
Support arbitrary protos when wrapping DOM objects with constructors.
Diffstat (limited to 'components/script/dom/htmltablesectionelement.rs')
-rw-r--r--components/script/dom/htmltablesectionelement.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/components/script/dom/htmltablesectionelement.rs b/components/script/dom/htmltablesectionelement.rs
index 5787546f2be..03cddf7bdd4 100644
--- a/components/script/dom/htmltablesectionelement.rs
+++ b/components/script/dom/htmltablesectionelement.rs
@@ -18,6 +18,7 @@ use crate::dom::virtualmethods::VirtualMethods;
use cssparser::RGBA;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
+use js::rust::HandleObject;
use style::attr::AttrValue;
#[dom_struct]
@@ -41,12 +42,14 @@ impl HTMLTableSectionElement {
local_name: LocalName,
prefix: Option<Prefix>,
document: &Document,
+ proto: Option<HandleObject>,
) -> DomRoot<HTMLTableSectionElement> {
- let n = Node::reflect_node(
+ let n = Node::reflect_node_with_proto(
Box::new(HTMLTableSectionElement::new_inherited(
local_name, prefix, document,
)),
document,
+ proto,
);
n.upcast::<Node>().set_weird_parser_insertion_mode();
@@ -75,7 +78,7 @@ impl HTMLTableSectionElementMethods for HTMLTableSectionElement {
node.insert_cell_or_row(
index,
|| self.Rows(),
- || HTMLTableRowElement::new(local_name!("tr"), None, &node.owner_doc()),
+ || HTMLTableRowElement::new(local_name!("tr"), None, &node.owner_doc(), None),
)
}