From 1f0fcb7d82cdc49128e8b534c2e6ac73f7fe9fc5 Mon Sep 17 00:00:00 2001 From: "K.J. Valencik" Date: Wed, 23 Mar 2022 15:26:21 -0400 Subject: [PATCH] Fix electron test --- test/electron/index.html | 2 -- test/electron/preload.js | 7 ++++++- 2 files changed, 6 insertions(+), 3 deletions(-) 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(), + }) + ); });