Closed
Description
From Francesco:
So, just writing down my thoughts on how we could lazy load the feedback screenshot stuff:
- We package the code into a new integration, similar to
@sentry-internal/replay-canvas
, e.g.@sentry-internal/feedback-media
or something like this. - This can be added in addition to
Feedback
to enable this. Users can add this manually, either lazy loading it themselves or just eagerly including this - normal integration stuff! - If users do not add this, what we'll do if a user clicks "Add screenshot" is inject a
<script>
tag to the integration CDN bundle into the page, and go from there. e.g. something like this:
function lazyLoadFeedbackMedia() {
const tag = `<script src='[https://cdn.sentry.com/${SDK_VERSION}/integration.feedback-media.min.js](https://cdn.sentry.com/$%7BSDK_VERSION%7D/integration.feedback-media.min.js)'></script>';
// inject tag into page
tag.onLoad = function() {
// continue when everything is ready
}
}
Metadata
Metadata
Assignees
Labels
No labels