* @param {string} metaName * @return {string|null}
(metaName)
| 6 | * @return {string|null} |
| 7 | */ |
| 8 | getMetaByName(metaName) { |
| 9 | const metas = self.document.head.querySelectorAll('meta[name]'); |
| 10 | return ( |
| 11 | Array.from(metas) |
| 12 | .find( |
| 13 | (meta) => |
| 14 | meta.getAttribute('name') === metaName && |
| 15 | meta.getAttribute('content') |
| 16 | ) |
| 17 | ?.getAttribute('content') || null |
| 18 | ); |
| 19 | }, |
| 20 | |
| 21 | /** |
| 22 | * @return {string} |
nothing calls this directly
no test coverage detected