and for some reason the generated output has a dependency on
window
window
:
function delegateEvents(eventNames, document = window.document) { const e = document[$$EVENTS] || (document[$$EVENTS] = new Set()); for (let i = 0, l = eventNames.length; i < l; i++) { const name = eventNames[i]; if (!e.has(name)) { e.add(name); document.addEventListener(name, eventHandler); } }}
function delegateEvents(eventNames, document = window.document) { const e = document[$$EVENTS] || (document[$$EVENTS] = new Set()); for (let i = 0, l = eventNames.length; i < l; i++) { const name = eventNames[i]; if (!e.has(name)) { e.add(name); document.addEventListener(name, eventHandler); } }}
This makes my library unusable in server-rendered environments.
Why does this happen and how do I get rid of this dependency?
Recent Announcements
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
S
SolidJS
Solid is a declarative reactive Javascript library for creating user interfaces.