aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/node.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r--components/script/dom/node.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs
index 4579890a03e..503cc589b50 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -196,6 +196,10 @@ bitflags! {
/// Specifies whether this node's shadow-including root is a document.
const IS_CONNECTED = 1 << 10;
+
+ /// Whether this node has a weird parser insertion mode. i.e whether setting innerHTML
+ /// needs extra work or not
+ const HAS_WEIRD_PARSER_INSERTION_MODE = 1 << 11;
}
}
@@ -554,6 +558,16 @@ impl Node {
self.flags.get().contains(NodeFlags::IS_IN_SHADOW_TREE)
}
+ pub fn has_weird_parser_insertion_mode(&self) -> bool {
+ self.flags
+ .get()
+ .contains(NodeFlags::HAS_WEIRD_PARSER_INSERTION_MODE)
+ }
+
+ pub fn set_weird_parser_insertion_mode(&self) {
+ self.set_flag(NodeFlags::HAS_WEIRD_PARSER_INSERTION_MODE, true)
+ }
+
pub fn is_connected(&self) -> bool {
self.flags.get().contains(NodeFlags::IS_CONNECTED)
}