Skip to content

Commit 2a4e12e

Browse files
committed
refactor: use outerHTML in html()
1 parent b714ce3 commit 2a4e12e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/wrappers/wrapper.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,7 @@ export default class Wrapper implements BaseWrapper {
216216
* Returns HTML of element as a string
217217
*/
218218
html (): string {
219-
const tmp = document.createElement('div')
220-
tmp.appendChild(this.element)
221-
return tmp.innerHTML
219+
return this.element.outerHTML
222220
}
223221

224222
/**

0 commit comments

Comments
 (0)