aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmltablecaptionelement.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/htmltablecaptionelement.rs')
-rw-r--r--components/script/dom/htmltablecaptionelement.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/components/script/dom/htmltablecaptionelement.rs b/components/script/dom/htmltablecaptionelement.rs
index e6ff3da673e..b89b647691e 100644
--- a/components/script/dom/htmltablecaptionelement.rs
+++ b/components/script/dom/htmltablecaptionelement.rs
@@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
+use crate::dom::bindings::inheritance::Castable;
use crate::dom::bindings::root::DomRoot;
use crate::dom::document::Document;
use crate::dom::htmlelement::HTMLElement;
@@ -31,11 +32,14 @@ impl HTMLTableCaptionElement {
prefix: Option<Prefix>,
document: &Document,
) -> DomRoot<HTMLTableCaptionElement> {
- Node::reflect_node(
+ let n = Node::reflect_node(
Box::new(HTMLTableCaptionElement::new_inherited(
local_name, prefix, document,
)),
document,
- )
+ );
+
+ n.upcast::<Node>().set_weird_parser_insertion_mode();
+ n
}
}