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

Reusing allow="" is a bit weird #5

Closed
domenic opened this issue Mar 22, 2023 · 3 comments
Closed

Reusing allow="" is a bit weird #5

domenic opened this issue Mar 22, 2023 · 3 comments

Comments

@domenic
Copy link

domenic commented Mar 22, 2023

allow="" already has a meaning related to permissions policy and <iframe>. Reusing it for <a>, presumably with a different set of tokens (not related to permissions policy), seems weird.

@bokand
Copy link
Owner

bokand commented Mar 23, 2023

I'm trying to reuse as much as possible that already exists, this was meant to be analogous in terms of giving the link permission to perform some action "open multiple windows", but yeah, the tokens wouldn't be the same so point taken.

Taking another look at this...I see we can specify the content type for an anchor using the type attribute. We could restrict automatically opening multiple windows unless the link hints its type as text/uri-list (or whatever we decide on for the content type). Would that work?

@domenic
Copy link
Author

domenic commented Mar 24, 2023

Wow, fascinating, I'd totally forgotten <a type=""> existed! Yeah, maybe it would work? Although changing something from a no-op "comment" to impacting the processing model is a bit unusual, so I think it would be worth some wider discussion.

In general, I think it's OK to invent new things for new features, instead of trying to find clever ways of reusing or repurposing existing things.

@bokand
Copy link
Owner

bokand commented Apr 4, 2023

Having thought about it more, I take back type as a suggestion. In addition to what you said, type would only work if 'new tab group' remains the only such capability since it doesn't allow multiple types. If we ever wanted to say "allow this link to open new tab groups AND allow it to perform-some-new-action" we wouldn't be able to express that.

A new token for the rel attribute could work? I'm not sure rel is right for this since it's not really a relationship between the link and the current document but it feels somewhat similar to values like noreferrer or noopener in that it changes the processing model of invoking the link.

Another option is to add a boolean attribute: <a collection href=...>

+@vmpstr for thoughts as well.

Another thing to keep in mind is we'll likely also need this on window.open.

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

No branches or pull requests

2 participants