Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not use passive listeners to improve scrolling performance #20

Open
rocc-o opened this issue Jun 9, 2023 · 0 comments
Open

Does not use passive listeners to improve scrolling performance #20

rocc-o opened this issue Jun 9, 2023 · 0 comments

Comments

@rocc-o
Copy link

rocc-o commented Jun 9, 2023

Hello,

I'm on Eleventy ^2.0.0 and is-land ^4.0.0.

I'm using is-land to load iframes on:interaction, like this:

<is-land on:interaction="" class="iframe__is-land iframe__is-land--video">

<div class="iframe__is-land--video-thumb">

<img
  srcset="{{ iframe_thumb_640 }} 640w, {{ iframe_thumb_1280 }} 1280w"
  sizes="(min-width: 860px) 680px, calc(79.07vw + 16px)"
  src="{{ iframe_thumb_640 }}"
  alt="Click to load video" loading="lazy" decoding="async" width="688" height="344">

</div>

  <template data-island="replace">

	<iframe title="{{ title_alt_text }}" src="{{ iframe_url }}"></iframe>

  </template>

</is-land>
.iframe__is-land[ready] { 
	background-image: none;
}

with <script src="/assets/js/is-land.min.js?v=1.0.0" type="module"></script>

On Chrome Lighthouse I get:
"Does not use passive listeners to improve scrolling performance. Consider marking your touch and wheel event listeners as passive to improve your page's scroll performance. Learn more about adopting passive event listeners."

Any chance to fix this? Thanks.

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

No branches or pull requests

1 participant