这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@jgerigmeyer
Copy link
Member

Description

This doesn't yet include the full fix for #246 because we don't have a robust solution for running the polyfill multiple times on the same page, but it makes two changes:

  1. Links with disabled are now ignored entirely.
  2. All attributes are copied over from the original link to the new one.

Related Issue(s)

Fixes #254.

@jgerigmeyer jgerigmeyer requested a review from jamesnw October 14, 2024 20:14
@netlify
Copy link

netlify bot commented Oct 14, 2024

Deploy Preview for anchor-position-wpt canceled.

Name Link
🔨 Latest commit 2895255
🔍 Latest deploy log https://app.netlify.com/sites/anchor-position-wpt/deploys/670e8fc0d07b75000867357c

@netlify
Copy link

netlify bot commented Oct 14, 2024

Deploy Preview for anchor-polyfill ready!

Name Link
🔨 Latest commit 2895255
🔍 Latest deploy log https://app.netlify.com/sites/anchor-polyfill/deploys/670e8fc0de24330008d24f90
😎 Deploy Preview https://deploy-preview-262--anchor-polyfill.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

* main:
  Add more waiting in tests
Copy link
Contributor

@jamesnw jamesnw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I think in addition to the mutation observer, we may still want to separately address things like integrity or referrerpolicy, or event handlers that we don't want to bring over. These were initially raised in #242.

@jgerigmeyer
Copy link
Member Author

LGTM! I think in addition to the mutation observer, we may still want to separately address things like integrity or referrerpolicy, or event handlers that we don't want to bring over. These were initially raised in #242.

Hm, good point. Do you think it would be worth compiling a list of either the attributes we want to explicitly exclude, or explicitly include? It's not perfect, but might be better than either the current implementation or this PR?

@jgerigmeyer jgerigmeyer requested a review from jamesnw October 15, 2024 15:51
Copy link
Contributor

@jamesnw jamesnw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good!

@jgerigmeyer jgerigmeyer merged commit 49081d8 into main Oct 15, 2024
12 checks passed
@jgerigmeyer jgerigmeyer deleted the link-attrs branch October 15, 2024 16:05
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.

[BUG] Data attributes get stripped from stylesheet <link>s

3 participants