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

Method get

css-inline/src/html/attributes.rs:180–183  ·  view source on GitHub ↗

Get the value of the attribute with the given local name, if it exists.

(&self, local: html5ever::LocalName)

Source from the content-addressed store, hash-verified

178
179 /// Get the value of the attribute with the given local name, if it exists.
180 pub(crate) fn get(&self, local: html5ever::LocalName) -> Option<&str> {
181 let needle = QualName::new(None, ns!(), local);
182 self.find(&needle)
183 }
184
185 pub(crate) fn get_css_inline(&self) -> Option<&str> {
186 self.attributes.iter().find_map(|probe| {

Callers 1

containsMethod · 0.45

Calls 1

findMethod · 0.80

Tested by

no test coverage detected