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

Lighthouse reporting failed passive listener on a script from other host #11100

Open
dKab opened this issue Jul 14, 2020 · 3 comments
Open

Lighthouse reporting failed passive listener on a script from other host #11100

dKab opened this issue Jul 14, 2020 · 3 comments
Assignees

Comments

@dKab
Copy link

dKab commented Jul 14, 2020

Provide the steps to reproduce

  1. Run LH on https://kabardinovd.com/posts/jquery/ (mobile)

What is the current behavior?

Best practices section shows failed audit
"Consider marking your touch and wheel event listeners as passive to improve your page's scroll performance." about this script:
https://www.gstatic.com/recaptcha/releases/nuX0GNR875hMLA1LR7ayD9tc/recaptcha__en.js
(host www.gstatic.com , whereas my host is kabardinovd.com)

What is the expected behavior?

As I understand lighthouse should filter out scripts from the hosts different from mine as I don't have control over them.

Environment Information

  • Affected Channels: DevTools (at least, didn't try with others)
  • Lighthouse version: 5.7.1
  • Chrome version: 83.0.4103.116 (Official Build) (64-bit) (cohort: Stable)
  • Node.js version: v12.18.2
  • Operating System: Windows 10
@patrickhulce
Copy link
Collaborator

patrickhulce commented Jul 14, 2020

As I understand lighthouse should filter out scripts from the hosts different from mine as I don't have control over them.

What led you to this expectation? If it came from us, then we should fix whatever told you that.

We allow third-party assets to be filtered out of tables but Lighthouse still assesses the main content of the page no matter what host contributed to it. The page owner's control over third-party assets is whether their benefit is worth the cost of inclusion :)

@dKab
Copy link
Author

dKab commented Jul 16, 2020

@patrickhulce

What led you to this expectation?

This page, where it says (number 4):

Lighthouse uses the following process to identify event listeners that may affect scrolling performance:

  1. Collect all event listeners on the page.
  2. Filter out non-touch and non-wheel listeners.
  3. Filter out listeners that call preventDefault().
  4. Filter out listeners that are from a different host than the page.

@patrickhulce
Copy link
Collaborator

Ah thanks for raising @dKab that doc is describing a Lighthouse from ~4 years ago 😬

We'll need to update it to reflect how the audit works now (which comes straight from browser-emitted violations)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants