(htmlString: string, selector: string)
| 2 | import { render } from './utils' |
| 3 | |
| 4 | function getDOMElement(htmlString: string, selector: string) { |
| 5 | const doc = document.implementation.createHTMLDocument('') |
| 6 | doc.body.innerHTML = htmlString |
| 7 | return doc.querySelector(selector) |
| 8 | } |
| 9 | |
| 10 | // A required field without a value is invalid |
| 11 | const invalidInputHtml = `<input required>` |