-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Polymer rewrites anchor hrefs #4213
Labels
Comments
This needs to be updated in Polymer and the HTMLImports polyfill. Tools will also need to be updated. We'll also need to add an option to Polymer 1.x |
sorvell
pushed a commit
that referenced
this issue
Feb 28, 2017
…e loadable resources (inline style and src attribute). This avoids scoping things like <a> href to template import location which is almost always not what the user wants. When this automated re-writing fails, users should fix url's via binding or imperative code.
8 tasks
6 tasks
Is this issue fixed and can be closed? |
Pretty sure it can. I'll close it and see if anything explodes 🙈 |
Will this happen with an object element carrying data attribute or src.
I only use the data attribute
On Mon, Jul 10, 2017 at 1:40 PM Rob Dodson ***@***.***> wrote:
Pretty sure it can. I'll close it and see if anything explodes 🙈
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#4213 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHxnvvZEo8JnYmU6nAStorN3ABiwxV-fks5sMmH5gaJpZM4LK71y>
.
--
…_________________________________
Jason C. Frazzano Esq.
Founder and Master Coach, Focused Coaching
Stanford University, B.A. M.A., with honors and distinction
Columbia Law School, J.D., Stone Scholar
www.focusedcoaching.com
[email protected]
[email protected]
office: 732-671-1834
|
@jfrazzano you can see what the fix does here: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
A relative url inside the href of an anchor element inside a Polymer element gets rewritten to be relative to the import.
For instance, if my element lives in
src/elements
Something like
<a href="foo">
becomes<a href="/src/elements/foo">
. While this behavior is desirable for things like CSS and images, it is not desirable for anchors as it messes up the ability to do routing with relative paths. This is especially important because Polymer's rewrite happens in a way that ignores the<base>
element, meaning if you want to serve your project from a subdirectory (like GH pages) you can't easily use<base>
to tack on the subdir.cc @sorvell @justinfagnani
The text was updated successfully, but these errors were encountered: