MCPcopy Create free account
hub / github.com/Stranger6667/css-inline / has_id

Method has_id

css-inline/src/html/element.rs:240–244  ·  view source on GitHub ↗
(&self, id: &LocalName, case_sensitivity: CaseSensitivity)

Source from the content-addressed store, hash-verified

238
239 #[inline]
240 fn has_id(&self, id: &LocalName, case_sensitivity: CaseSensitivity) -> bool {
241 self.attributes()
242 .get(local_name!("id"))
243 .is_some_and(|id_attr| case_sensitivity.eq(id.as_bytes(), id_attr.as_bytes()))
244 }
245
246 #[inline]
247 fn has_class(&self, name: &LocalName, case_sensitivity: CaseSensitivity) -> bool {

Callers

nothing calls this directly

Calls 4

attributesMethod · 0.80
eqMethod · 0.80
as_bytesMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected