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

Print stylesheet unexpectedly gets onload attribute #552

Closed
swissspidy opened this issue Jan 31, 2023 · 3 comments
Closed

Print stylesheet unexpectedly gets onload attribute #552

swissspidy opened this issue Jan 31, 2023 · 3 comments
Assignees
Labels

Comments

@swissspidy
Copy link

If I understand #444 / 07be40b correctly, print stylesheets should be unaffected by the script. And that seems to actually be the case—the print stylesheet is not part of the extracted critical CSS.

However, the <link> tag still erroneously gets an onload attribute, which does not make sense.

Input HTML:

<link rel="stylesheet" href="css/print.css" media="print">

Expected output:

(unchanged)

Actual output:

<link rel="stylesheet" href="css/print.css" media="print" onload="this.media='print'">
@bezoerb bezoerb self-assigned this Feb 6, 2023
@bezoerb bezoerb added the bug label Feb 6, 2023
@bezoerb
Copy link
Collaborator

bezoerb commented Feb 6, 2023

Thanks for the issue 😊
I'll try to find some time to look into this in the next days.

@bezoerb
Copy link
Collaborator

bezoerb commented Feb 16, 2023

Moved this issue to inline-critical because it's responsible for the inlining & rewriting.
Keeping this open until the issue is fixed upstream.

bezoerb added a commit that referenced this issue Oct 7, 2023
@bezoerb
Copy link
Collaborator

bezoerb commented Oct 8, 2023

Should be fixed in v6.0.2

@bezoerb bezoerb closed this as completed Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants