MCPcopy Create free account
hub / github.com/ampproject/amphtml / parseAttrs

Function parseAttrs

src/preact/parse-props.js:333–336  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

331 const attrs = [name];
332 /** @type {function(Element):T|''|null} */
333 const parseAttrs = (element) => {
334 const attr = element.getAttribute(name);
335 return attr && parse(attr);
336 };
337 return {
338 'attrs': attrs,
339 'parseAttrs': parseAttrs,

Callers

nothing calls this directly

Calls 4

dashToCamelCaseFunction · 0.90
attrMatchesFunction · 0.85
getAttributeMethod · 0.80
parseFunction · 0.50

Tested by

no test coverage detected