diff --git a/test/electron/index.html b/test/electron/index.html
index 3cafb85e2..20dd1fe01 100644
--- a/test/electron/index.html
+++ b/test/electron/index.html
@@ -8,8 +8,6 @@
Neon Electron Test
-
-
diff --git a/test/electron/preload.js b/test/electron/preload.js
index 243aa5348..f34bbf636 100644
--- a/test/electron/preload.js
+++ b/test/electron/preload.js
@@ -1,5 +1,10 @@
const native = require("./index.node");
window.addEventListener("DOMContentLoaded", () => {
- document.getElementById("greeting").innerText = native.hello();
+ document.body.appendChild(
+ Object.assign(document.createElement("h1"), {
+ id: "greeting",
+ innerText: native.hello(),
+ })
+ );
});