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

Capture links in dynamic content #1337

Merged

Conversation

reneaaron
Copy link
Contributor

Describe the changes you have made in this PR

Capture ALL lightning: links.

Link this PR to an issue

#1307

Type of change (Remove other not matching type)

  • fix: Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the style guidelines of this project and performed a self-review of my own code
  • New and existing tests pass locally with my changes
  • I checked if I need to make corresponding changes to the documentation (and made those changes if needed)

@github-actions
Copy link

github-actions bot commented Aug 25, 2022

🚀 Thanks for the pull request!

Here are the current build files for testing:

Download and unzip the file for your browser. Refer to the readme for detailed install instructions.


This build is brought to you by: null (who recently dropped 210 sats):

Checkout the Alby Lightning Mixtape: https://alby-mixtape.vercel.app - happy coding!

Want to sponsor the next build? send some sats to ⚡️builds@getalby.com (don't forget to provide your name)

Don't forget: keep stacking sats!

@reneaaron reneaaron marked this pull request as ready for review September 6, 2022 07:46
Copy link
Collaborator

@bumi bumi left a comment

Choose a reason for hiding this comment

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

this is mainly the composedPath, correct?

(ev) => {
// Use composedPath() for detecting links inside a Shadow DOM
// https://developer.mozilla.org/en-US/docs/Web/API/Event/composedPath
const target = ev.composedPath()[0] || ev.target;
Copy link
Collaborator

Choose a reason for hiding this comment

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

is ev.composedPath() always returning an array?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

According to the docs, yes:

image

@reneaaron
Copy link
Contributor Author

this is mainly the composedPath, correct?

I currently can't think of a case where composedPath is null. I'll test and remove the old ev.target potentially.

@reneaaron reneaaron force-pushed the feature/capture-links-in-dynamic-content branch from 063cdd1 to a608656 Compare September 6, 2022 14:08
@bumi bumi merged commit a1db6f3 into getAlby:master Sep 6, 2022
@reneaaron reneaaron deleted the feature/capture-links-in-dynamic-content branch September 7, 2022 06:50
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.

None yet

3 participants