( root: HTMLDivElement, title: string, body: string, )
| 175 | }; |
| 176 | |
| 177 | export const renderMessage = ( |
| 178 | root: HTMLDivElement, |
| 179 | title: string, |
| 180 | body: string, |
| 181 | ): void => { |
| 182 | root.replaceChildren(); |
| 183 | const { shell, card } = createPromptShell(); |
| 184 | |
| 185 | const heading = document.createElement('h2'); |
| 186 | heading.className = 'embedded-browsing-heading'; |
| 187 | heading.textContent = title; |
| 188 | |
| 189 | const paragraph = document.createElement('p'); |
| 190 | paragraph.className = 'embedded-browsing-body'; |
| 191 | paragraph.textContent = body; |
| 192 | |
| 193 | card.append(heading, paragraph); |
| 194 | root.append(shell); |
| 195 | }; |
| 196 | |
| 197 | type PermissionRequestOutcome = 'granted' | 'dismissed' | 'failed'; |
| 198 |
no test coverage detected