You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason might be that in the SSR environment, a virtual implementation of the Document element is needed. However, the example provided (which I referenced from this Observable example) is somewhat outdated.
I added the following line of code in the constructor of Document, to work around this issue:
classDocument{constructor(){this.documentElement=newElement(this,'html');this.defaultView={ Event };// workaround}// other things}
Perhaps the example file needs to be updated?
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
During SSR rendering, an error occurs:
Cannot read properties of undefined (reading 'Event')
. The specific location of the error is in:plot.js:183:59
. https://github.com/observablehq/plot/blame/90a56897cabda400e2b7537f8ecbbd2cebd18f7f/src/plot.js#L183The reason might be that in the SSR environment, a virtual implementation of the Document element is needed. However, the example provided (which I referenced from this Observable example) is somewhat outdated.
I added the following line of code in the constructor of Document, to work around this issue:
Perhaps the example file needs to be updated?
The text was updated successfully, but these errors were encountered: