Skip to content

noscript support#11

Open
s3ththompson wants to merge 1 commit into
monoeq:masterfrom
s3ththompson:noscript
Open

noscript support#11
s3ththompson wants to merge 1 commit into
monoeq:masterfrom
s3ththompson:noscript

Conversation

@s3ththompson

@s3ththompson s3ththompson commented Jul 8, 2018

Copy link
Copy Markdown

This is a first pass at implementing noscript.

Unfortunately implementing this cleanly is more difficult than I thought. There seems to be no good way to hide the non-noscript element from a browser that is in noscript mode. This implementation sets the non-noscript element to display:none; until client-side JS runs, but this seems less than ideal as it means image containers won't take shape until the JS bundle is executed.

Let me know if you have any thoughts here...

EDIT: or perhaps hiding the non-noscript element should not work out of the box but instead require pasting a snippet of code into the head? lazysizes seems to suggest this, but it's not clear to me how the .no-js class gets added/removed.

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