From 1ea44c519ac8fbcb4a1c164f80c0d58ba887c36d Mon Sep 17 00:00:00 2001 From: Ryan Christian <33403762+rschristian@users.noreply.github.com> Date: Sun, 5 May 2024 10:35:54 -0500 Subject: [PATCH 1/3] fix: Method syntax for IE11 support --- compat/client.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compat/client.js b/compat/client.js index cc3a60d9e4..3d910598cd 100644 --- a/compat/client.js +++ b/compat/client.js @@ -2,10 +2,10 @@ const { render, hydrate, unmountComponentAtNode } = require('preact/compat'); function createRoot(container) { return { - render(children) { + render: function (children) { render(children, container); }, - unmount() { + unmount: function () { unmountComponentAtNode(container); } }; From 185d0ef11b466361b8bc15426ab9ecef0c2fc20b Mon Sep 17 00:00:00 2001 From: Ryan Christian <33403762+rschristian@users.noreply.github.com> Date: Sun, 5 May 2024 10:36:54 -0500 Subject: [PATCH 2/3] fix: Method syntax for IE11 support --- compat/client.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compat/client.mjs b/compat/client.mjs index f262a14d84..773b5eb047 100644 --- a/compat/client.mjs +++ b/compat/client.mjs @@ -2,10 +2,10 @@ import { render, hydrate, unmountComponentAtNode } from 'preact/compat'; export function createRoot(container) { return { - render(children) { + render: function (children) { render(children, container); }, - unmount() { + unmount: function () { unmountComponentAtNode(container); } }; From 41ce33b5207d2003ef63ad387c88756a084fd9b2 Mon Sep 17 00:00:00 2001 From: Ryan Christian <33403762+rschristian@users.noreply.github.com> Date: Sun, 5 May 2024 10:42:18 -0500 Subject: [PATCH 3/3] chore: Silence ESLint --- compat/client.js | 2 ++ compat/client.mjs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/compat/client.js b/compat/client.js index 3d910598cd..bc48c21bf2 100644 --- a/compat/client.js +++ b/compat/client.js @@ -2,9 +2,11 @@ const { render, hydrate, unmountComponentAtNode } = require('preact/compat'); function createRoot(container) { return { + // eslint-disable-next-line render: function (children) { render(children, container); }, + // eslint-disable-next-line unmount: function () { unmountComponentAtNode(container); } diff --git a/compat/client.mjs b/compat/client.mjs index 773b5eb047..f9d1814e18 100644 --- a/compat/client.mjs +++ b/compat/client.mjs @@ -2,9 +2,11 @@ import { render, hydrate, unmountComponentAtNode } from 'preact/compat'; export function createRoot(container) { return { + // eslint-disable-next-line render: function (children) { render(children, container); }, + // eslint-disable-next-line unmount: function () { unmountComponentAtNode(container); }