From fb2acb0b02be16bf5dd518adbc82ec08579efe4c Mon Sep 17 00:00:00 2001 From: Delan Azabani Date: Tue, 21 Mar 2023 13:57:46 +0800 Subject: [PATCH] clarify todos about exposed objects --- components/script/dom/document.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 27a3230efcd..d8a01e68b4d 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -4799,7 +4799,9 @@ impl DocumentMethods for Document { name == *self.name || !name.is_empty() && elem.get_id().as_ref() == Some(&self.name) }), - // TODO: Handle exposed objects. + // TODO handle and ; these depend on whether the element is + // “exposed”, a concept that doesn’t fully make sense until embed/object + // behaviour is actually implemented _ => false, } } @@ -5357,12 +5359,16 @@ fn is_named_element_with_name_attribute(elem: &Element) -> bool { HTMLElementTypeId::HTMLFormElement | HTMLElementTypeId::HTMLIFrameElement | HTMLElementTypeId::HTMLImageElement => true, - // TODO: Handle exposed objects. + // TODO handle and ; these depend on whether the element is + // “exposed”, a concept that doesn’t fully make sense until embed/object + // behaviour is actually implemented _ => false, } } fn is_named_element_with_id_attribute(elem: &Element) -> bool { - // TODO: Handle exposed objects. + // TODO handle and ; these depend on whether the element is + // “exposed”, a concept that doesn’t fully make sense until embed/object + // behaviour is actually implemented elem.is::() && elem.get_name().map_or(false, |name| !name.is_empty()) }