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
Figure out how to dog food: For dog fooding SvelteKit later, we can use the SvelteKit Realworld app. For Pure Svelte, it's a little more complicated. There are very few projects out there. One of them is a Svelte clone of MacOS. We could use this one. We don't have an internal app to dogfood on.
Add a SvelteKit detection mechanism to our SDK and inserts a SvelteKit entry into `event.modules` if we detect that the frontend in which the SDK is used, was rendered by SvelteKit.
To check this, we check for the existence of a div with the id `svelte-announcer` that's automatically injected into the rendered HTML by SvelteKit. It is used to improve accessibility (see sveltejs/kit#307) but we can leverage it as a SvelteKit detection criterion.
Btw, we're not the first ones who came up with this approach, as it turns out: https://twitter.com/jhewt/status/1359632380483493889
Introduce a new utils function, `getDomElement` in which we consolidate the usage of `document.querySelector` in the SDK. So in addition to using this new function for obtaining the div described above, we now also call it in `BrowserTracing` to get `<meta>` tags.
Add some tests to test the new behaviour and the helper functions. We might want to consider writing an integration test for this feature but this first requires a Svelte SDK integration test infrastructure.
ref: getsentry#5573
Uh oh!
There was an error while loading. Please reload this page.
Tracking To Do items for the second alpha release of the Svelte SDK
ref: #5492
The text was updated successfully, but these errors were encountered: