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

Support rel and referrer policy attributes #213

Merged
merged 4 commits into from
Oct 16, 2021
Merged

Conversation

PaperStrike
Copy link
Owner

@PaperStrike PaperStrike commented Oct 16, 2021

Motivation and Context

The request to send by an element typically relies on two attributes, rel and referrerpolicy:

This PR adds support for this two attributes to Pjax's default trigger.

You may have noticed the spec didn't mention referrerpolicy attribute on <form>s. Yes, it hasn't achieve a standard, yet. I still add its support in Pjax, cause:

  1. WHATWG members consider the lacking of this attribute an "oversight" and tend to add the support. See Add referrerpolicy to <form> whatwg/html#4320.
  2. No reasonable case conflicts with this attribute. (Even rare within very non-conforming plugins / websites.)
  3. Bypassing this for <form>s requires a more complex algorithm.

How Has This Been Tested?

Sorry, I don't have a plan for adding default trigger's test cases, yet.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactor (no bug fix and new feature but improvements)

Checklist:

  • My change requires new tests.
  • I have added tests to cover my changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@PaperStrike PaperStrike added enhancement New feature or request minor Pull requests that require a minor version update labels Oct 16, 2021
@PaperStrike PaperStrike merged commit c747e48 into main Oct 16, 2021
@PaperStrike PaperStrike deleted the rel-referrer-attrs branch October 16, 2021 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request minor Pull requests that require a minor version update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant