Skip to content

Resize iframe with ResizeObserver#392

Merged
laymonage merged 1 commit into
mainfrom
resize-message
Feb 9, 2022
Merged

Resize iframe with ResizeObserver#392
laymonage merged 1 commit into
mainfrom
resize-message

Conversation

@laymonage

Copy link
Copy Markdown
Member

This replaces iframe-resizer with a custom solution using the modern built-in ResizeObserver. I'd love to remove the iframeResizer.contentWindow.min.js script from our widget page, but that'd be a breaking change to the giscus-component users until they (and I) update it to use ResizeObserver. We'll have to do that sooner or later, but for now let's just set the script's strategy to lazyOnload.

This saves us ~6KB in the client. We can save an additional 5KB if we completely remove the contentWindow script from the widget page. Probably would save even more in giscus-component.

@vercel

vercel Bot commented Feb 9, 2022

Copy link
Copy Markdown

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/giscus/giscus/FPjVa9hWQNenfJXX4sarsu5NZqwm
✅ Preview: https://giscus-git-resize-message-giscus.vercel.app

@laymonage laymonage changed the title Resize iframe with ResizeObserver Resize iframe with ResizeObserver Feb 9, 2022
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.

1 participant