Get a string attribute value, or undefined if missing.
(name: string)
| 17 | |
| 18 | /** Get a string attribute value, or undefined if missing. */ |
| 19 | attr(name: string): string | undefined { |
| 20 | if (!this.el) return undefined; |
| 21 | return this.el.hasAttribute(name) ? this.el.getAttribute(name)! : undefined; |
| 22 | } |
| 23 | |
| 24 | /** Get a numeric attribute value, or undefined if missing or not a number. */ |
| 25 | numAttr(name: string): number | undefined { |
no outgoing calls
no test coverage detected