Skip to content

Conversation

@mindflowgo
Copy link

Server-side Rendering enabled frameworks try to run the code beforehand. Some of them like SvelteKit don't like it when inline DOM methods are present. It's a relatively light/easy fix - we just moved the few instances of these DOM methods from within the Tiny-Slider codebase into a function that is called within the TNS constructor.

No real changes to the code-base and yet the plugin can be used within SSR frameworks like SvelteKit. Thanks team!

@amanpatel
Copy link

I tried this fork but got the error "Element is not defined". I'll try to find a fix in my version of the fork.

@mindflowgo
Copy link
Author

I tried this fork but got the error "Element is not defined". I'll try to find a fix in my version of the fork.

Hmm maybe timing issue in DOM. What environment did you use it in, i can try to simulate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants