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

Add crossorigin link attribute #87

Merged
merged 3 commits into from
Apr 3, 2023

Conversation

davidrothera
Copy link
Contributor

@davidrothera davidrothera commented Dec 18, 2022

The crossorigin attribute is needed for things like Google fonts where you should link to it like below:

…
<link rel=“preconnect” href=“http://foo.com” crossorigin />
…

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attributes

At the moment doing this means manually creating an Attribute instance but this would be cleaner.

Copy link
Owner

@JohnSundell JohnSundell left a comment

Choose a reason for hiding this comment

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

Thanks a lot for this @davidrothera, and I'm very sorry for taking so long to review your PR! I've left a suggestion inline, otherwise I think this looks fantastic.

Sources/Plot/API/HTMLAttributes.swift Outdated Show resolved Hide resolved
@JohnSundell JohnSundell added the awaiting update Waiting for an update from the PR's author. label Mar 31, 2023
@davidrothera
Copy link
Contributor Author

Amended with changes as per your suggestion @JohnSundell 👍

Copy link
Owner

@JohnSundell JohnSundell left a comment

Choose a reason for hiding this comment

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

Thanks a lot for updating your PR, @davidrothera! It looks fantastic now - I just did some minor edits to rename the boolean parameter to isEnabled and added parameter docs. Ready to merge in now 😀

@JohnSundell JohnSundell merged commit 969f9bb into JohnSundell:master Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting update Waiting for an update from the PR's author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants